Class ASTJexlScript
java.lang.Object
org.apache.commons.jexl2.parser.SimpleNode
org.apache.commons.jexl2.parser.JexlNode
org.apache.commons.jexl2.parser.ASTJexlScript
Enhanced script to allow parameters declaration.
-
Nested Class Summary
Nested classes/interfaces inherited from class JexlNode
JexlNode.Literal<T> -
Field Summary
Fields inherited from class SimpleNode
children, id, parent, value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFrame(Object... values) Creates an array of arguments by copying values up to the number of parameters.intGets the (maximum) number of arguments this script expects.String[]Gets this script local variable, i.e.String[]Gets this script parameters, i.e.String[]Gets this script registers, i.e.getScope()Gets this script scope.jjtAccept(ParserVisitor visitor, Object data) Accept the visitor.voidsetScope(JexlEngine.Scope theScope) Sets the parameters and registersMethods inherited from class JexlNode
debugInfo, debugString, isConstant, isConstantMethods inherited from class SimpleNode
childrenAccept, dump, getId, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetParent, jjtSetValue, toString, toString
-
Constructor Details
-
ASTJexlScript
-
ASTJexlScript
-
-
Method Details
-
jjtAccept
Description copied from class:SimpleNodeAccept the visitor.- Specified by:
jjtAcceptin interfaceNode- Overrides:
jjtAcceptin classSimpleNode- Parameters:
visitor- the visitordata- contextual data- Returns:
- result of visit
-
setScope
Sets the parameters and registers- Parameters:
theScope- the scope
-
getScope
Gets this script scope. -
createFrame
Creates an array of arguments by copying values up to the number of parameters.- Parameters:
values- the argument values- Returns:
- the arguments array
-
getArgCount
Gets the (maximum) number of arguments this script expects.- Returns:
- the number of parameters
-
getRegisters
Gets this script registers, i.e. parameters and local variables.- Returns:
- the register names
-
getParameters
Gets this script parameters, i.e. registers assigned before creating local variables.- Returns:
- the parameter names
-
getLocalVariables
Gets this script local variable, i.e. registers assigned to local variables.- Returns:
- the parameter names
-