Package org.mvel2.compiler
Class PropertyVerifier
- java.lang.Object
-
- org.mvel2.compiler.AbstractParser
-
- org.mvel2.optimizers.AbstractOptimizer
-
- org.mvel2.compiler.PropertyVerifier
-
- All Implemented Interfaces:
Serializable,Parser
public class PropertyVerifier extends AbstractOptimizer
This verifier is used by the compiler to enforce rules such as type strictness. It is, as side-effect, also responsible for extracting type information.- Author:
- Mike Brock, Dhanji Prasanna
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.mvel2.optimizers.AbstractOptimizer
BEAN, collection, currType, nullSafe, staticAccess, tkStart
-
Fields inherited from class org.mvel2.compiler.AbstractParser
CLASS_LITERALS, compileMode, cursor, debugSymbols, dStack, end, expr, fields, GET, GET_OR_CREATE, greedy, lastLineStart, lastNode, lastWasComment, lastWasIdentifier, lastWasLineLabel, length, LEVEL_0_PROPERTY_ONLY, LEVEL_1_BASIC_LANG, LEVEL_2_MULTI_STATEMENT, LEVEL_3_ITERATION, LEVEL_4_ASSIGNMENT, LEVEL_5_CONTROL_FLOW, line, literalOnly, LITERALS, OP_CONTINUE, OP_NOT_LITERAL, OP_OVERFLOW, OP_RESET_FRAME, OP_TERMINATE, OPERATORS, pCtx, REMOVE, SET, splitAccumulator, st, start, stk, variableFactory
-
-
Constructor Summary
Constructors Constructor Description PropertyVerifier(char[] property, int start, int offset, ParserContext parserContext)PropertyVerifier(char[] property, ParserContext parserContext)PropertyVerifier(String property, ParserContext parserContext)PropertyVerifier(String property, ParserContext parserContext, Class root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classanalyze()Analyze the statement and return the known egress type.ClassgetCtx()List<String>getInputs()booleanisClassLiteral()booleanisDeepProperty()booleanisFqcn()booleanisInput()booleanisMethodCall()booleanisResolvedExternally()voidsetCtx(Class ctx)voidsetInputs(List<String> inputs)-
Methods inherited from class org.mvel2.optimizers.AbstractOptimizer
capture, findLastUnion, nextSubToken, scanTo, tryStaticAccess, whiteSpaceSkip
-
Methods inherited from class org.mvel2.compiler.AbstractParser
addFatalError, addFatalError, arithmeticFunctionReduction, captureIdentifier, captureToEOS, captureToEOSorEOL, captureToEOT, captureToNextTokenJunction, expectEOS, expectNextChar_IW, getCursor, getExpression, handleSubstatement, handleUnion, ifThenElseBlockContinues, incNextNonBlank, isArithmeticOperator, isNextIdentifier, isNextIdentifierOrLiteral, isStatementNotManuallyTerminated, lastNonWhite, loadLanguageFeaturesByLevel, lookAhead, lookAhead, lookBehind, lookToLast, nextNonBlank, nextToken, nextTokenSkipSymbols, reduce, setExpression, setExpression, setLanguageLevel, setupParser, skipWhitespace, tokenContinues, trimLeft, trimRight, trimWhitespace
-
-
-
-
Constructor Detail
-
PropertyVerifier
public PropertyVerifier(char[] property, ParserContext parserContext)
-
PropertyVerifier
public PropertyVerifier(char[] property, int start, int offset, ParserContext parserContext)
-
PropertyVerifier
public PropertyVerifier(String property, ParserContext parserContext)
-
PropertyVerifier
public PropertyVerifier(String property, ParserContext parserContext, Class root)
-
-
Method Detail
-
analyze
public Class analyze()
Analyze the statement and return the known egress type.- Returns:
- known engress type
-
isResolvedExternally
public boolean isResolvedExternally()
-
isClassLiteral
public boolean isClassLiteral()
-
isDeepProperty
public boolean isDeepProperty()
-
isInput
public boolean isInput()
-
isMethodCall
public boolean isMethodCall()
-
isFqcn
public boolean isFqcn()
-
getCtx
public Class getCtx()
-
setCtx
public void setCtx(Class ctx)
-
-