|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.jexl.ExpressionImpl
Instances of ExpressionImpl are created by the ExpressionFactory,
and this is the default implementation of the Expression interface.
| Field Summary | |
protected java.lang.String |
expression
Original expression - this is just a 'snippet', not a valid statement (i.e. |
protected SimpleNode |
node
The resulting AST we can call value() on |
protected java.util.List |
postResolvers
|
protected java.util.List |
preResolvers
|
| Constructor Summary | |
(package private) |
ExpressionImpl(java.lang.String expr,
SimpleNode ref)
do not let this be generally instantiated with a 'new' |
| Method Summary | |
void |
addPostResolver(JexlExprResolver resolver)
allows addition of a resolver to allow custom interdiction of expression evaluation |
void |
addPreResolver(JexlExprResolver resolver)
allows addition of a resolver to allow custom interdiction of expression evaluation |
java.lang.Object |
evaluate(JexlContext context)
Evaluate the expression and return the value. |
java.lang.String |
getExpression()
returns original expression string |
protected java.lang.Object |
tryResolver(java.util.List resolverList,
JexlContext context)
Tries the resolvers in the given resolverlist against the context |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.List preResolvers
protected java.util.List postResolvers
protected java.lang.String expression
protected SimpleNode node
| Constructor Detail |
ExpressionImpl(java.lang.String expr,
SimpleNode ref)
| Method Detail |
public java.lang.Object evaluate(JexlContext context)
throws java.lang.Exception
evaluate in interface Expressioncontext - Context containing objects/data used for evaluation
java.lang.Exception
protected java.lang.Object tryResolver(java.util.List resolverList,
JexlContext context)
resolverList - list of JexlExprResolverscontext - JexlContext to use for evauluation
public java.lang.String getExpression()
getExpression in interface Expressionpublic void addPreResolver(JexlExprResolver resolver)
Expression
addPreResolver in interface Expressionresolver - resolver to be called before Jexl expression evaluatedpublic void addPostResolver(JexlExprResolver resolver)
addPostResolver in interface Expressionresolver - resolver to be called if Jexl expression evaluated to null
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||