org.mvel
Class ExpressionCompiler

java.lang.Object
  extended by org.mvel.AbstractParser
      extended by org.mvel.ExpressionCompiler
All Implemented Interfaces:
java.io.Serializable

public class ExpressionCompiler
extends AbstractParser

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mvel.AbstractParser
cursor, debugSymbols, expr, fields, GET, GET_OR_CREATE, greedy, 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, literalOnly, LITERALS, OPERATORS, parserContext, REMOVE, SET, splitAccumulator
 
Constructor Summary
ExpressionCompiler(char[] expression)
           
ExpressionCompiler(java.lang.String expression)
           
ExpressionCompiler(java.lang.String expression, boolean verifying)
           
 
Method Summary
 CompiledExpression _compile()
          Initiate an in-context compile.
 CompiledExpression compile()
           
 CompiledExpression compile(ParserContext ctx)
           
 java.lang.String getExpression()
           
 ParserContext getParserContextState()
           
 java.lang.Class getReturnType()
           
 boolean isLiteralOnly()
           
 boolean isVerifying()
           
 void removeParserContext()
           
 void setReturnType(java.lang.Class returnType)
           
 void setVerifying(boolean verifying)
           
protected  ASTNode verify(ParserContext pCtx, ASTNode tk)
           
 
Methods inherited from class org.mvel.AbstractParser
addFatalError, addFatalError, addWarning, blockContinues, captureToEOLorOF, captureToEOS, captureToEOT, captureTokenToEOS, contextControl, getCurrentSourceFileName, getCurrentThreadParserContext, getParserContext, handleSubstatement, handleUnion, isAt, isDebugSymbols, isNext, isRemain, isReservedWord, isStatementManuallyTerminated, lookAhead, lookAhead, lookBehind, lookBehind, newContext, newContext, nextToken, nextTokenSkipSymbols, removeContext, resetParserContext, setDebugSymbols, setExpression, setExpression, setLanguageLevel, skipToNextTokenJunction, skipWhitespace, skipWhitespaceWithLineAccounting, tokenContinues, trimLeft, trimRight, trimWhitespace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionCompiler

public ExpressionCompiler(java.lang.String expression)

ExpressionCompiler

public ExpressionCompiler(java.lang.String expression,
                          boolean verifying)

ExpressionCompiler

public ExpressionCompiler(char[] expression)
Method Detail

compile

public CompiledExpression compile()

compile

public CompiledExpression compile(ParserContext ctx)

_compile

public CompiledExpression _compile()
Initiate an in-context compile. 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)

getReturnType

public java.lang.Class getReturnType()

setReturnType

public void setReturnType(java.lang.Class returnType)

getExpression

public java.lang.String getExpression()

getParserContextState

public ParserContext getParserContextState()

removeParserContext

public void removeParserContext()

isLiteralOnly

public boolean isLiteralOnly()