|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Script
A JEXL Script.
A script is some valid JEXL syntax to be executed with
a given set of JexlContext
variables.
A script is a group of statements, separated by semicolons.
The statements can be blocks
(curly braces containing code),
Control statements such as if
and while
as well as expressions and assignment statements.
Method Summary | |
---|---|
Callable<Object> |
callable(JexlContext context)
Creates a Callable from this script. |
Callable<Object> |
callable(JexlContext context,
Object... args)
Creates a Callable from this script. |
Object |
execute(JexlContext context)
Executes the script with the variables contained in the supplied JexlContext . |
Object |
execute(JexlContext context,
Object... args)
Executes the script with the variables contained in the supplied JexlContext and a set of arguments corresponding to the
parameters used during parsing. |
String[] |
getLocalVariables()
Gets this script local variables. |
String[] |
getParameters()
Gets this script parameters. |
String |
getText()
Returns the text of this Script. |
Set<List<String>> |
getVariables()
Gets this script variables. |
Method Detail |
---|
Object execute(JexlContext context)
JexlContext
.
context
- A JexlContext containing variables.
Object execute(JexlContext context, Object... args)
JexlContext
and a set of arguments corresponding to the
parameters used during parsing.
context
- A JexlContext containing variables.args
- the arguments
String getText()
String[] getParameters()
String[] getLocalVariables()
Set<List<String>> getVariables()
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.
Callable<Object> callable(JexlContext context)
This allows to submit it to an executor pool and provides support for asynchronous calls.
The interpreter will handle interruption/cancellation gracefully if needed.
context
- the context
Callable<Object> callable(JexlContext context, Object... args)
This allows to submit it to an executor pool and provides support for asynchronous calls.
The interpreter will handle interruption/cancellation gracefully if needed.
context
- the contextargs
- the script arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |