Package org.mvel2.optimizers
Class AbstractOptimizer
- java.lang.Object
-
- org.mvel2.compiler.AbstractParser
-
- org.mvel2.optimizers.AbstractOptimizer
-
- All Implemented Interfaces:
Serializable,Parser
- Direct Known Subclasses:
ASMAccessorOptimizer,DynamicOptimizer,PropertyVerifier,ReflectiveAccessorOptimizer
public class AbstractOptimizer extends AbstractParser
- Author:
- Christopher Brock
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static intBEANprotected static intCOLprotected booleancollectionprotected ClasscurrTypeprotected static intMETHprotected booleannullSafeprotected booleanstaticAccessprotected inttkStartprotected static intWITH-
Fields inherited from class org.mvel2.compiler.AbstractParser
CLASS_LITERALS, compileMode, ctx, cursor, debugSymbols, dStack, end, expr, fields, GET, GET_OR_CREATE, greedy, lastLineStart, lastNode, lastWasComment, lastWasIdentifier, lastWasLineLabel, lastWasVar, 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 Modifier Constructor Description protectedAbstractOptimizer()protectedAbstractOptimizer(ParserContext pCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringcapture()protected intfindLastUnion()protected intnextSubToken()protected booleanscanTo(char c)protected ObjecttryStaticAccess()Try static access of the property, and return an instance of the Field, Method of Class if successful.protected voidwhiteSpaceSkip()Skip to the next non-whitespace position.-
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
-
-
-
-
Field Detail
-
BEAN
protected static final int BEAN
- See Also:
- Constant Field Values
-
METH
protected static final int METH
- See Also:
- Constant Field Values
-
COL
protected static final int COL
- See Also:
- Constant Field Values
-
WITH
protected static final int WITH
- See Also:
- Constant Field Values
-
collection
protected boolean collection
-
nullSafe
protected boolean nullSafe
-
currType
protected Class currType
-
staticAccess
protected boolean staticAccess
-
tkStart
protected int tkStart
-
-
Constructor Detail
-
AbstractOptimizer
protected AbstractOptimizer()
-
AbstractOptimizer
protected AbstractOptimizer(ParserContext pCtx)
-
-
Method Detail
-
tryStaticAccess
protected Object tryStaticAccess()
Try static access of the property, and return an instance of the Field, Method of Class if successful.- Returns:
- - Field, Method or Class instance.
-
nextSubToken
protected int nextSubToken()
-
capture
protected String capture()
-
whiteSpaceSkip
protected void whiteSpaceSkip()
Skip to the next non-whitespace position.
-
scanTo
protected boolean scanTo(char c)
- Parameters:
c- - character to scan to.- Returns:
- - returns true is end of statement is hit, false if the scan scar is countered.
-
findLastUnion
protected int findLastUnion()
-
-