|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jexl2.ExpressionImpl
public class ExpressionImpl
Instances of ExpressionImpl are created by the JexlEngine
,
and this is the default implementation of the Expression
and
Script
interface.
Field Summary | |
---|---|
protected String |
expression
Original expression stripped from leading & trailing spaces. |
protected JexlEngine |
jexl
The engine for this expression. |
protected ASTJexlScript |
script
The resulting AST we can interpret. |
Constructor Summary | |
---|---|
protected |
ExpressionImpl(JexlEngine engine,
String expr,
ASTJexlScript ref)
Do not let this be generally instantiated with a 'new'. |
Method Summary | |
---|---|
String |
dump()
Returns the JEXL expression by reconstructing it from the parsed tree. |
Object |
evaluate(JexlContext context)
Evaluates the expression with the variables contained in the supplied JexlContext . |
Object |
execute(JexlContext context)
Executes the script with the variables contained in the supplied JexlContext . |
String |
getExpression()
Returns the JEXL expression this Expression was created with. |
String |
getText()
Returns the text of this Script. |
String |
toString()
Provide a string representation of the expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final JexlEngine jexl
protected final String expression
protected final ASTJexlScript script
Constructor Detail |
---|
protected ExpressionImpl(JexlEngine engine, String expr, ASTJexlScript ref)
engine
- the interpreter to evaluate the expressionexpr
- the expression.ref
- the parsed expression.Method Detail |
---|
public Object evaluate(JexlContext context)
JexlContext
.
evaluate
in interface Expression
context
- A JexlContext containing variables.
public String dump()
dump
in interface Expression
public String getExpression()
getExpression
in interface Expression
public String toString()
toString
in class Object
public String getText()
getText
in interface Script
public Object execute(JexlContext context)
JexlContext
.
execute
in interface Script
context
- A JexlContext containing variables.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |