JexlEngine,
and this is the default implementation of the Expression and
Script interface.
| Modifier and Type | Field and Description |
|---|---|
| protected final String | expression
Original expression stripped from leading & trailing spaces. |
| protected final JexlEngine | jexl
The engine for this expression. |
| protected final ASTJexlScript | script
The resulting AST we can interpret. |
| Access | Constructor and Description |
|---|---|
| protected | ExpressionImpl(JexlEngine
the interpreter to evaluate the expression engine, String the expression. expr, ASTJexlScript the parsed expression. ref)Do not let this be generally instantiated with a 'new'. |
| Modifier and Type | Method and Description |
|---|---|
| public Callable | callable(JexlContext
the context context)Implements org. |
| public Callable | callable(JexlContext
the context context, Object... the script arguments args)Implements org. |
| public String | dump()
Implements org. |
| public Object | evaluate(JexlContext
A JexlContext containing variables. context)Implements org. JexlContext.
|
| public Object | execute(JexlContext
A JexlContext containing variables. context)Implements org. JexlContext.
|
| public Object | execute(JexlContext
A JexlContext containing variables. context, Object... the arguments args)Implements org. JexlContext and a set of arguments corresponding to the
parameters used during parsing.
|
| public String | getExpression()
Implements org. |
| public String[] | getLocalVariables()
Implements org. |
| public String[] | getParameters()
Implements org. |
| public String | |
| public Set | |
| public String | Returns: the expression or blank if it's null.Overrides java. |
| expression | back to summary |
|---|---|
| protected final String expression Original expression stripped from leading & trailing spaces. | |
| jexl | back to summary |
|---|---|
| protected final JexlEngine jexl The engine for this expression. | |
| script | back to summary |
|---|---|
| protected final ASTJexlScript script The resulting AST we can interpret. | |
| ExpressionImpl | back to summary |
|---|---|
| protected ExpressionImpl(JexlEngine engine, String expr, ASTJexlScript ref) Do not let this be generally instantiated with a 'new'.
| |
| callable | back to summary |
|---|---|
| public Callable Implements org. Doc from org. Creates a Callable from this script. This allows to submit it to an executor pool and provides support for asynchronous calls. The interpreter will handle interruption/cancellation gracefully if needed.
| |
| callable | back to summary |
|---|---|
| public Callable Implements org. Doc from org. Creates a Callable from this script. This allows to submit it to an executor pool and provides support for asynchronous calls. The interpreter will handle interruption/cancellation gracefully if needed.
| |
| dump | back to summary |
|---|---|
| public String dump() Implements org. Doc from org. Returns the JEXL expression by reconstructing it from the parsed tree.
| |
| evaluate | back to summary |
|---|---|
| public Object evaluate(JexlContext context) Implements org. Doc from org. Evaluates the expression with the variables contained in the
supplied
| |
| execute | back to summary |
|---|---|
| public Object execute(JexlContext context) Implements org. Doc from org. Executes the script with the variables contained in the
supplied
| |
| execute | back to summary |
|---|---|
| public Object execute(JexlContext context, Object... args) Implements org. Doc from org. Executes the script with the variables contained in the
supplied
| |
| getExpression | back to summary |
|---|---|
| public String getExpression() Implements org. Doc from org. Returns the JEXL expression this Expression was created with.
| |
| getLocalVariables | back to summary |
|---|---|
| public String[] getLocalVariables() Implements org. Doc from org. Gets this script local variables.
| |
| getParameters | back to summary |
|---|---|
| public String[] getParameters() Implements org. Doc from org. Gets this script parameters.
| |
| getText | back to summary |
|---|---|
| public String getText() Implements org. Doc from org. Returns the text of this Script.
| |
| getVariables | back to summary |
|---|---|
| public Set Implements org. Doc from org. Gets this script variables. Note that since variables can be in an ant-ish form (ie foo.bar.quux), each variable is returned as a list of strings where each entry is a fragment of the variable ({"foo", "bar", "quux"} in the example. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Provide a string representation of this expression. | |