|
||||||||||
| 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 java.lang.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,
java.lang.String expr,
ASTJexlScript ref)
Do not let this be generally instantiated with a 'new'. |
| Method Summary | |
|---|---|
java.lang.String |
dump()
Returns the JEXL expression by reconstructing it from the parsed tree. |
java.lang.Object |
evaluate(JexlContext context)
Evaluates the expression with the variables contained in the supplied JexlContext. |
java.lang.Object |
execute(JexlContext context)
Executes the script with the variables contained in the supplied JexlContext. |
java.lang.String |
getExpression()
Returns the JEXL expression this Expression was created with. |
java.lang.String |
getText()
Returns the text of this Script. |
java.lang.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 java.lang.String expression
protected final ASTJexlScript script
| Constructor Detail |
|---|
protected ExpressionImpl(JexlEngine engine,
java.lang.String expr,
ASTJexlScript ref)
engine - the interpreter to evaluate the expressionexpr - the expression.ref - the parsed expression.| Method Detail |
|---|
public java.lang.Object evaluate(JexlContext context)
JexlContext.
evaluate in interface Expressioncontext - A JexlContext containing variables.
public java.lang.String dump()
dump in interface Expressionpublic java.lang.String getExpression()
getExpression in interface Expressionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getText()
getText in interface Scriptpublic java.lang.Object execute(JexlContext context)
JexlContext.
execute in interface Scriptcontext - A JexlContext containing variables.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||