org.apache.commons.jexl3.internal

## Class Interpreter

- java.lang.Object
- - org.apache.commons.jexl3.parser.ParserVisitor
  - - org.apache.commons.jexl3.internal.Interpreter

- Direct Known Subclasses:
    TemplateInterpreter

      public class Interpreter
      extends ParserVisitor

  An interpreter of JEXL syntax.
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JexlArithmetic` | `arithmetic` The arithmetic handler.
    `protected boolean` | `cache` Cache executors.
    `protected boolean` | `cancelled` Cancellation support.
    `protected JexlContext` | `context` The context to store/retrieve variables.
    `protected static Object[]` | `EMPTY_PARAMS` Empty parameters for method matching.
    `protected Scope.Frame` | `frame` symbol values.
    `protected Map<String,Object>` | `functions` The map of symboled functions.
    `protected Map<String,Object>` | `functors` The map of symboled functions.
    `protected Engine` | `jexl` The JEXL engine.
    `protected org.apache.commons.logging.Log` | `logger` The logger.
    `protected JexlContext.NamespaceResolver` | `ns` The context to store/retrieve variables.
    `protected Operators` | `operators` The operators evaluation delegate.
    `protected boolean` | `silent` Silent interpreter flag.
    `protected boolean` | `strictArithmetic` Strict interpreter flag.
    `protected boolean` | `strictEngine` Strict interpreter flag (may temporarily change when calling size and empty as functions).
    `protected JexlUberspect` | `uberspect` The uberspect.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Interpreter(Engine engine, JexlContext aContext, Scope.Frame eFrame)` Creates an interpreter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Object` | `call(JexlNode node, Object target, Object functor, ASTArguments argNode)` Calls a method (or function).
    `protected Object` | `executeAssign(JexlNode node, JexlOperator assignop, Object data)` Executes an assignment with an optional side-effect operator.
    `protected JexlNode` | `findNullOperand(RuntimeException xrt, JexlNode node, Object left, Object right)` Finds the node causing a NPE for diadic operators.
    `Object` | `getAttribute(Object object, Object attribute)` Gets an attribute of an object.
    `protected Object` | `getAttribute(Object object, Object attribute, JexlNode node)` Gets an attribute of an object.
    `Object` | `interpret(JexlNode node)` Interpret the given script/expression.
    `protected Object` | `invocationFailed(JexlException xjexl)` Triggered when method, function or constructor invocation fails.
    `protected boolean` | `isCancelled()` Checks whether this interpreter execution was cancelled due to thread interruption.
    `protected boolean` | `isLocalVariable(ASTReference node, int which)` Checks whether a reference child node holds a local variable reference.
    `protected boolean` | `isTernaryProtected(JexlNode node)` Check if a null evaluated expression is protected by a ternary expression.
    `protected void` | `operatorError(JexlNode node, JexlOperator operator, Throwable cause)` Triggered when an operator fails.
    `protected Object` | `resolveNamespace(String prefix, JexlNode node)` Resolves a namespace, eventually allocating an instance using context as constructor argument.
    `void` | `setAttribute(Object object, Object attribute, Object value)` Sets an attribute of an object.
    `protected void` | `setAttribute(Object object, Object attribute, Object value, JexlNode node)` Sets an attribute of an object.
    `protected Object` | `unsolvableMethod(JexlNode node, String method)` Triggered when a method can not be resolved.
    `protected Object` | `unsolvableProperty(JexlNode node, String var, Throwable cause)` Triggered when a property can not be resolved.
    `protected Object` | `unsolvableVariable(JexlNode node, String var, boolean undef)` Triggered when a variable can not be resolved.
    `protected Object` | `visit(ASTAddNode node, Object data)`
    `protected Object` | `visit(ASTAndNode node, Object data)`
    `protected Object[]` | `visit(ASTArguments node, Object data)`
    `protected Object` | `visit(ASTArrayAccess node, Object data)`
    `protected Object` | `visit(ASTArrayLiteral node, Object data)`
    `protected Object` | `visit(ASTAssignment node, Object data)`
    `protected Object` | `visit(ASTBitwiseAndNode node, Object data)`
    `protected Object` | `visit(ASTBitwiseComplNode node, Object data)`
    `protected Object` | `visit(ASTBitwiseOrNode node, Object data)`
    `protected Object` | `visit(ASTBitwiseXorNode node, Object data)`
    `protected Object` | `visit(ASTBlock node, Object data)`
    `protected Object` | `visit(ASTBreak node, Object data)`
    `protected Object` | `visit(ASTConstructorNode node, Object data)`
    `protected Object` | `visit(ASTContinue node, Object data)`
    `protected Object` | `visit(ASTDivNode node, Object data)`
    `protected Object` | `visit(ASTEmptyFunction node, Object data)`
    `protected Object` | `visit(ASTEmptyMethod node, Object data)`
    `protected Object` | `visit(ASTEQNode node, Object data)`
    `protected Object` | `visit(ASTERNode node, Object data)`
    `protected Object` | `visit(ASTEWNode node, Object data)`
    `protected Object` | `visit(ASTExtendedLiteral node, Object data)`
    `protected Object` | `visit(ASTFalseNode node, Object data)`
    `protected Object` | `visit(ASTForeachStatement node, Object data)`
    `protected Object` | `visit(ASTFunctionNode node, Object data)`
    `protected Object` | `visit(ASTGENode node, Object data)`
    `protected Object` | `visit(ASTGTNode node, Object data)`
    `protected Object` | `visit(ASTIdentifierAccess node, Object data)`
    `protected Object` | `visit(ASTIdentifier node, Object data)`
    `protected Object` | `visit(ASTIfStatement node, Object data)`
    `protected Object` | `visit(ASTJexlScript node, Object data)`
    `protected Object` | `visit(ASTJxltLiteral node, Object data)`
    `protected Object` | `visit(ASTLENode node, Object data)`
    `protected Object` | `visit(ASTLTNode node, Object data)`
    `protected Object` | `visit(ASTMapEntry node, Object data)`
    `protected Object` | `visit(ASTMapLiteral node, Object data)`
    `protected Object` | `visit(ASTMethodNode node, Object data)`
    `protected Object` | `visit(ASTModNode node, Object data)`
    `protected Object` | `visit(ASTMulNode node, Object data)`
    `protected Object` | `visit(ASTNENode node, Object data)`
    `protected Object` | `visit(ASTNEWNode node, Object data)`
    `protected Object` | `visit(ASTNotNode node, Object data)`
    `protected Object` | `visit(ASTNRNode node, Object data)`
    `protected Object` | `visit(ASTNSWNode node, Object data)`
    `protected Object` | `visit(ASTNullLiteral node, Object data)`
    `protected Object` | `visit(ASTNumberLiteral node, Object data)`
    `protected Object` | `visit(ASTOrNode node, Object data)`
    `protected Object` | `visit(ASTRangeNode node, Object data)`
    `protected Object` | `visit(ASTReferenceExpression node, Object data)`
    `protected Object` | `visit(ASTReference node, Object data)`
    `protected Object` | `visit(ASTReturnStatement node, Object data)`
    `protected Object` | `visit(ASTSetAddNode node, Object data)`
    `protected Object` | `visit(ASTSetAndNode node, Object data)`
    `protected Object` | `visit(ASTSetDivNode node, Object data)`
    `protected Object` | `visit(ASTSetLiteral node, Object data)`
    `protected Object` | `visit(ASTSetModNode node, Object data)`
    `protected Object` | `visit(ASTSetMultNode node, Object data)`
    `protected Object` | `visit(ASTSetOrNode node, Object data)`
    `protected Object` | `visit(ASTSetSubNode node, Object data)`
    `protected Object` | `visit(ASTSetXorNode node, Object data)`
    `protected Object` | `visit(ASTSizeFunction node, Object data)`
    `protected Object` | `visit(ASTSizeMethod node, Object data)`
    `protected Object` | `visit(ASTStringLiteral node, Object data)`
    `protected Object` | `visit(ASTSubNode node, Object data)`
    `protected Object` | `visit(ASTSWNode node, Object data)`
    `protected Object` | `visit(ASTTernaryNode node, Object data)`
    `protected Object` | `visit(ASTTrueNode node, Object data)`
    `protected Object` | `visit(ASTUnaryMinusNode node, Object data)`
    `protected Object` | `visit(ASTVar node, Object data)`
    `protected Object` | `visit(ASTWhileStatement node, Object data)`

    - ### Methods inherited from class org.apache.commons.jexl3.parser.ParserVisitor

      `visit, visit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### jexl

          protected final Engine jexl

      The JEXL engine.

    - #### logger

          protected final org.apache.commons.logging.Log logger

      The logger.

    - #### uberspect

          protected final JexlUberspect uberspect

      The uberspect.

    - #### arithmetic

          protected final JexlArithmetic arithmetic

      The arithmetic handler.

    - #### operators

          protected final Operators operators

      The operators evaluation delegate.

    - #### functions

          protected final Map<String,Object> functions

      The map of symboled functions.

    - #### functors

          protected Map<String,Object> functors

      The map of symboled functions.

    - #### context

          protected final JexlContext context

      The context to store/retrieve variables.

    - #### ns

          protected final JexlContext.NamespaceResolver ns

      The context to store/retrieve variables.

    - #### strictEngine

          protected boolean strictEngine

      Strict interpreter flag (may temporarily change when calling size and empty as functions).

    - #### strictArithmetic

          protected final boolean strictArithmetic

      Strict interpreter flag.

    - #### silent

          protected final boolean silent

      Silent interpreter flag.

    - #### cache

          protected final boolean cache

      Cache executors.

    - #### frame

          protected final Scope.Frame frame

      symbol values.

    - #### cancelled

          protected volatile boolean cancelled

      Cancellation support.

    - #### EMPTY_PARAMS

          protected static final Object[] EMPTY_PARAMS

      Empty parameters for method matching.

  - ### Constructor Detail

    - #### Interpreter

          protected Interpreter(Engine engine,
                     JexlContext aContext,
                     Scope.Frame eFrame)

      Creates an interpreter.
      Parameters:
        `engine` - the engine creating this interpreter
        `aContext` - the context to evaluate expression
        `eFrame` - the interpreter evaluation frame

  - ### Method Detail

    - #### interpret

          public Object interpret(JexlNode node)

      Interpret the given script/expression.

      If the underlying JEXL engine is silent, errors will be logged through its logger as warning.

      Parameters:
        `node` - the script or expression to interpret.
      Returns:
        the result of the interpretation.
      Throws:
        `JexlException` - if any error occurs during interpretation.

    - #### findNullOperand

          protected JexlNode findNullOperand(RuntimeException xrt,
                                 JexlNode node,
                                 Object left,
                                 Object right)

      Finds the node causing a NPE for diadic operators.
      Parameters:
        `xrt` - the RuntimeException
        `node` - the parent node
        `left` - the left argument
        `right` - the right argument
      Returns:
        the left, right or parent node

    - #### unsolvableVariable

          protected Object unsolvableVariable(JexlNode node,
                                  String var,
                                  boolean undef)

      Triggered when a variable can not be resolved.
      Parameters:
        `node` - the node where the error originated from
        `var` - the variable name
        `undef` - whether the variable is undefined or null
      Returns:
        throws JexlException if isStrict, null otherwise

    - #### unsolvableMethod

          protected Object unsolvableMethod(JexlNode node,
                                String method)

      Triggered when a method can not be resolved.
      Parameters:
        `node` - the node where the error originated from
        `method` - the method name
      Returns:
        throws JexlException if isStrict, null otherwise

    - #### unsolvableProperty

          protected Object unsolvableProperty(JexlNode node,
                                  String var,
                                  Throwable cause)

      Triggered when a property can not be resolved.
      Parameters:
        `node` - the node where the error originated from
        `var` - the property name
        `cause` - the cause if any
      Returns:
        throws JexlException if isStrict, null otherwise

    - #### operatorError

          protected void operatorError(JexlNode node,
                           JexlOperator operator,
                           Throwable cause)

      Triggered when an operator fails.
      Parameters:
        `node` - the node where the error originated from
        `operator` - the method name
        `cause` - the cause of error (if any)
      Throws:
        `JexlException` - if isStrict

    - #### invocationFailed

          protected Object invocationFailed(JexlException xjexl)

      Triggered when method, function or constructor invocation fails.
      Parameters:
        `xjexl` - the JexlException wrapping the original error
      Returns:
        throws JexlException if isStrict, null otherwise

    - #### isCancelled

          protected boolean isCancelled()

      Checks whether this interpreter execution was cancelled due to thread interruption.
      Returns:
        true if cancelled, false otherwise

    - #### resolveNamespace

          protected Object resolveNamespace(String prefix,
                                JexlNode node)

      Resolves a namespace, eventually allocating an instance using context as constructor argument.

      The lifetime of such instances span the current expression or script evaluation.

      Parameters:
        `prefix` - the prefix name (may be null for global namespace)
        `node` - the AST node
      Returns:
        the namespace instance

    - #### visit

          protected Object visit(ASTAddNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSubNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTMulNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTDivNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTModNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTBitwiseAndNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTBitwiseOrNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTBitwiseXorNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTEQNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNENode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTGENode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTGTNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTLENode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTLTNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSWNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNSWNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTEWNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNEWNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTERNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNRNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTRangeNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTUnaryMinusNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTBitwiseComplNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNotNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTIfStatement node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTBlock node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTReturnStatement node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTContinue node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTBreak node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTForeachStatement node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTWhileStatement node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTAndNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTOrNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNullLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTTrueNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTFalseNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTNumberLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTStringLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTArrayLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTExtendedLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTMapLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTMapEntry node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTTernaryNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSizeFunction node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSizeMethod node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTEmptyFunction node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTEmptyMethod node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTJexlScript node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTVar node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTReferenceExpression node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTIdentifier node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTArrayAccess node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### isTernaryProtected

          protected boolean isTernaryProtected(JexlNode node)

      Check if a null evaluated expression is protected by a ternary expression.

      The rationale is that the ternary / elvis expressions are meant for the user to explictly take control over the error generation; ie, ternaries can return null even if the engine in isStrict mode would normally throw an exception.

      Parameters:
        `node` - the expression node
      Returns:
        true if nullable variable, false otherwise

    - #### isLocalVariable

          protected boolean isLocalVariable(ASTReference node,
                                int which)

      Checks whether a reference child node holds a local variable reference.
      Parameters:
        `node` - the reference node
        `which` - the child we are checking
      Returns:
        true if child is local variable, false otherwise

    - #### visit

          protected Object visit(ASTIdentifierAccess node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTReference node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTAssignment node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetAddNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetSubNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetMultNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetDivNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetModNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetAndNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetOrNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTSetXorNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### executeAssign

          protected Object executeAssign(JexlNode node,
                             JexlOperator assignop,
                             Object data)

      Executes an assignment with an optional side-effect operator.
      Parameters:
        `node` - the node
        `assignop` - the assignment operator or null if simply assignment
        `data` - the data
      Returns:
        the left hand side

    - #### visit

          protected Object[] visit(ASTArguments node,
                       Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTMethodNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### visit

          protected Object visit(ASTFunctionNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### call

          protected Object call(JexlNode node,
                    Object target,
                    Object functor,
                    ASTArguments argNode)

      Calls a method (or function).

      Method resolution is a follows: 1 - attempt to find a method in the target passed as parameter; 2 - if this fails, seeks a JexlScript or JexlMethod or a duck-callable* as a property of that target; 3 - if this fails, narrow the arguments and try again 1 4 - if this fails, seeks a context or arithmetic method with the proper name taking the target as first argument;

      *duck-callable: an object where a "call" function exists
      Parameters:
        `node` - the method node
        `target` - the target of the method, what it should be invoked upon
        `functor` - the object carrying the method or function or the method identifier
        `argNode` - the node carrying the arguments
      Returns:
        the result of the method invocation

    - #### visit

          protected Object visit(ASTConstructorNode node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

    - #### getAttribute

          public Object getAttribute(Object object,
                            Object attribute)

      Gets an attribute of an object.
      Parameters:
        `object` - to retrieve value from
        `attribute` - the attribute of the object, e.g. an index (1, 0, 2) or key for a map
      Returns:
        the attribute value

    - #### getAttribute

          protected Object getAttribute(Object object,
                            Object attribute,
                            JexlNode node)

      Gets an attribute of an object.
      Parameters:
        `object` - to retrieve value from
        `attribute` - the attribute of the object, e.g. an index (1, 0, 2) or key for a map
        `node` - the node that evaluated as the object
      Returns:
        the attribute value

    - #### setAttribute

          public void setAttribute(Object object,
                          Object attribute,
                          Object value)

      Sets an attribute of an object.
      Parameters:
        `object` - to set the value to
        `attribute` - the attribute of the object, e.g. an index (1, 0, 2) or key for a map
        `value` - the value to assign to the object's attribute

    - #### setAttribute

          protected void setAttribute(Object object,
                          Object attribute,
                          Object value,
                          JexlNode node)

      Sets an attribute of an object.
      Parameters:
        `object` - to set the value to
        `attribute` - the attribute of the object, e.g. an index (1, 0, 2) or key for a map
        `value` - the value to assign to the object's attribute
        `node` - the node that evaluated as the object

    - #### visit

          protected Object visit(ASTJxltLiteral node,
                     Object data)

      Specified by:
        `visit` in class `ParserVisitor`

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.