Class ASTJexlScript

  • All Implemented Interfaces:
    JexlInfo, Node

    public class ASTJexlScript
    extends JexlNode
    Enhanced script to allow parameters declaration.
    • Constructor Detail

      • ASTJexlScript

        public ASTJexlScript​(int id)
      • ASTJexlScript

        public ASTJexlScript​(Parser p,
                             int id)
    • Method Detail

      • jjtAccept

        public java.lang.Object jjtAccept​(ParserVisitor visitor,
                                          java.lang.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
      • createFrame

        public JexlEngine.Frame createFrame​(java.lang.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 java.lang.String[] getRegisters()
        Gets this script registers, i.e. parameters and local variables.
        Returns:
        the register names
      • getParameters

        public java.lang.String[] getParameters()
        Gets this script parameters, i.e. registers assigned before creating local variables.
        Returns:
        the parameter names
      • getLocalVariables

        public java.lang.String[] getLocalVariables()
        Gets this script local variable, i.e. registers assigned to local variables.
        Returns:
        the parameter names