org.apache.commons.jexl2.parser
Class ASTJexlScript

java.lang.Object
  extended by org.apache.commons.jexl2.parser.SimpleNode
      extended by org.apache.commons.jexl2.parser.JexlNode
          extended by org.apache.commons.jexl2.parser.ASTJexlScript
All Implemented Interfaces:
JexlInfo, Node

public class ASTJexlScript
extends JexlNode

Enhanced script to allow parameters declaration.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.jexl2.parser.JexlNode
JexlNode.Literal<T>
 
Field Summary
 
Fields inherited from class org.apache.commons.jexl2.parser.JexlNode
image
 
Fields inherited from class org.apache.commons.jexl2.parser.SimpleNode
children, id, parent, value
 
Constructor Summary
ASTJexlScript(int id)
           
ASTJexlScript(Parser p, int id)
           
 
Method Summary
 JexlEngine.Frame createFrame(Object... values)
          Creates an array of arguments by copying values up to the number of parameters.
 int getArgCount()
          Gets the (maximum) number of arguments this script expects.
 String[] getLocalVariables()
          Gets this script local variable, i.e.
 String[] getParameters()
          Gets this script parameters, i.e.
 String[] getRegisters()
          Gets this script registers, i.e.
 JexlEngine.Scope getScope()
          Gets this script scope.
 Object jjtAccept(ParserVisitor visitor, Object data)
          Accept the visitor.
 void setScope(JexlEngine.Scope theScope)
          Sets the parameters and registers
 
Methods inherited from class org.apache.commons.jexl2.parser.JexlNode
debugInfo, debugString, isConstant, isConstant
 
Methods inherited from class org.apache.commons.jexl2.parser.SimpleNode
childrenAccept, dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetParent, jjtSetValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTJexlScript

public ASTJexlScript(int id)

ASTJexlScript

public ASTJexlScript(Parser p,
                     int id)
Method Detail

jjtAccept

public Object jjtAccept(ParserVisitor visitor,
                        Object data)
Description copied from class: SimpleNode
Accept the visitor.

Specified by:
jjtAccept in interface Node
Overrides:
jjtAccept in class SimpleNode
Parameters:
visitor - the visitor
data - contextual data
Returns:
result of visit

setScope

public void setScope(JexlEngine.Scope theScope)
Sets the parameters and registers

Parameters:
theScope - the scope

getScope

public JexlEngine.Scope getScope()
Gets this script scope.


createFrame

public JexlEngine.Frame createFrame(Object... values)
Creates an array of arguments by copying values up to the number of parameters.

Parameters:
values - the argument values
Returns:
the arguments array

getArgCount

public int getArgCount()
Gets the (maximum) number of arguments this script expects.

Returns:
the number of parameters

getRegisters

public String[] getRegisters()
Gets this script registers, i.e. parameters and local variables.

Returns:
the register names

getParameters

public String[] getParameters()
Gets this script parameters, i.e. registers assigned before creating local variables.

Returns:
the parameter names

getLocalVariables

public String[] getLocalVariables()
Gets this script local variable, i.e. registers assigned to local variables.

Returns:
the parameter names


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.