Class ASTJexlScript

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial uid.
        See Also:
        Constant Field Values
      • pragmas

        private java.util.Map<java.lang.String,​java.lang.Object> pragmas
        The pragmas.
      • features

        private transient JexlFeatures features
        Features.
      • scope

        private transient Scope scope
        The script scope.
    • Constructor Detail

      • ASTJexlScript

        public ASTJexlScript​(int id)
      • ASTJexlScript

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

      • createFrame

        public Frame createFrame​(Frame caller,
                                 java.lang.Object... values)
        Creates an array of arguments by copying values up to the number of parameters.
        Parameters:
        caller - the calling frame
        values - the argument values
        Returns:
        the arguments array
      • createFrame

        public 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
      • getCapturedVariables

        public java.lang.String[] getCapturedVariables()
        Gets this script captured variable, i.e. symbols captured from outer scopes.
        Returns:
        the captured variable names
      • getFeatures

        public JexlFeatures getFeatures()
        Returns:
        this script scope
      • getLocalVariables

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

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

        public java.util.Map<java.lang.String,​java.lang.Object> getPragmas()
        Returns:
        this script pragmas.
      • getScope

        public Scope getScope()
        Returns:
        this script scope
      • getSymbols

        public java.lang.String[] getSymbols()
        Gets this script symbols, i.e. parameters and local variables.
        Returns:
        the symbol names
      • isCapturedSymbol

        public boolean isCapturedSymbol​(int symbol)
        Checks whether a given symbol is captured.
        Parameters:
        symbol - the symbol number
        Returns:
        true if captured, false otherwise
      • jjtAccept

        public java.lang.Object jjtAccept​(ParserVisitor visitor,
                                          java.lang.Object data)
        Description copied from class: SimpleNode
        Accepts the visitor.
        Specified by:
        jjtAccept in interface Node
        Overrides:
        jjtAccept in class SimpleNode
        Parameters:
        visitor - the visitor
        data - contextual data
        Returns:
        result of visit
      • script

        public ASTJexlScript script()
        Consider script with no parameters that return lambda as parametric-scripts.
        Returns:
        the script
      • setFeatures

        public void setFeatures​(JexlFeatures theFeatures)
        Sets this script features.
        Parameters:
        theFeatures - the features
      • setPragmas

        public void setPragmas​(java.util.Map<java.lang.String,​java.lang.Object> thePragmas)
        Sets this script pragmas.
        Parameters:
        thePragmas - the pragmas
      • setScope

        public void setScope​(Scope theScope)
        Sets this script scope.
        Parameters:
        theScope - the scope