public interface Expression
Represents a single JEXL expression. This simple interface provides access to the underlying expression through getExpression(), and it provides hooks to add a pre- and post- expression resolver.
An expression is different than a script - it is simply a reference of an expression.
| Modifier and Type | Method and Description |
|---|---|
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.
|
Object |
evaluate(JexlContext context)
Evaluates the expression with the variables contained in the
supplied
JexlContext. |
String |
getExpression()
Returns the JEXL expression this Expression was created with.
|
Object evaluate(JexlContext context) throws Exception
JexlContext.context - A JexlContext containing variables.Exception - on any errorString getExpression()
void addPreResolver(JexlExprResolver resolver)
resolver - resolver to be called before Jexl expression evaluatedvoid addPostResolver(JexlExprResolver resolver)
resolver - resolver to be called if Jexl expression
evaluated to null.Copyright © 2016 The Apache Software Foundation. All rights reserved.