Package org.mvel2.compiler
Class ExpressionCompiler
- java.lang.Object
-
- org.mvel2.compiler.AbstractParser
-
- org.mvel2.compiler.ExpressionCompiler
-
- All Implemented Interfaces:
Serializable,Parser
public class ExpressionCompiler extends AbstractParser
This is the main MVEL compiler.- See Also:
- Serialized Form
-
-
Field Summary
-
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 Constructor Description ExpressionCompiler(char[] expression)ExpressionCompiler(char[] expression, int start, int offset)ExpressionCompiler(char[] expression, int start, int offset, ParserContext ctx)ExpressionCompiler(char[] expression, ParserContext ctx)ExpressionCompiler(String expression)ExpressionCompiler(String expression, boolean verifying)ExpressionCompiler(String expression, int start, int offset, ParserContext ctx)ExpressionCompiler(String expression, ParserContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledExpression_compile()Initiate an in-context compileShared.CompiledExpressioncompile()ParserContextgetParserContextState()ClassgetReturnType()booleanisLiteralOnly()booleanisVerifying()booleanisVerifyOnly()voidsetReturnType(Class returnType)voidsetVerifying(boolean verifying)voidsetVerifyOnly(boolean verifyOnly)protected ASTNodeverify(ParserContext pCtx, ASTNode tk)-
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
-
ExpressionCompiler
public ExpressionCompiler(String expression)
-
ExpressionCompiler
public ExpressionCompiler(String expression, boolean verifying)
-
ExpressionCompiler
public ExpressionCompiler(char[] expression)
-
ExpressionCompiler
public ExpressionCompiler(String expression, ParserContext ctx)
-
ExpressionCompiler
public ExpressionCompiler(char[] expression, int start, int offset)
-
ExpressionCompiler
public ExpressionCompiler(String expression, int start, int offset, ParserContext ctx)
-
ExpressionCompiler
public ExpressionCompiler(char[] expression, int start, int offset, ParserContext ctx)
-
ExpressionCompiler
public ExpressionCompiler(char[] expression, ParserContext ctx)
-
-
Method Detail
-
compile
public CompiledExpression compile()
-
_compile
public CompiledExpression _compile()
Initiate an in-context compileShared. This method should really only be called by the internal API.- Returns:
- compiled expression object
-
verify
protected ASTNode verify(ParserContext pCtx, ASTNode tk)
-
isVerifying
public boolean isVerifying()
-
setVerifying
public void setVerifying(boolean verifying)
-
isVerifyOnly
public boolean isVerifyOnly()
-
setVerifyOnly
public void setVerifyOnly(boolean verifyOnly)
-
getReturnType
public Class getReturnType()
-
setReturnType
public void setReturnType(Class returnType)
-
getParserContextState
public ParserContext getParserContextState()
-
isLiteralOnly
public boolean isLiteralOnly()
-
-