org.apache.commons.jexl3.parser

## Class JexlNode

- java.lang.Object
- - org.apache.commons.jexl3.parser.SimpleNode
  - - org.apache.commons.jexl3.parser.JexlNode

- All Implemented Interfaces:
    Node
  Direct Known Subclasses:
    ASTAddNode, ASTAmbiguous, ASTAndNode, ASTArguments, ASTArrayAccess, ASTArrayLiteral, ASTAssignment, ASTBitwiseAndNode, ASTBitwiseComplNode, ASTBitwiseOrNode, ASTBitwiseXorNode, ASTBlock, ASTBreak, ASTConstructorNode, ASTContinue, ASTDivNode, ASTEmptyFunction, ASTEmptyMethod, ASTEQNode, ASTERNode, ASTEWNode, ASTExtendedLiteral, ASTFalseNode, ASTForeachStatement, ASTFunctionNode, ASTGENode, ASTGTNode, ASTIdentifier, ASTIdentifierAccess, ASTIfStatement, ASTJexlScript, ASTJxltLiteral, ASTLENode, ASTLTNode, ASTMapEntry, ASTMapLiteral, ASTMethodNode, ASTModNode, ASTMulNode, ASTNENode, ASTNEWNode, ASTNotNode, ASTNRNode, ASTNSWNode, ASTNullLiteral, ASTNumberLiteral, ASTOrNode, ASTRangeNode, ASTReference, ASTReferenceExpression, ASTReturnStatement, ASTSetAddNode, ASTSetAndNode, ASTSetDivNode, ASTSetLiteral, ASTSetModNode, ASTSetMultNode, ASTSetOrNode, ASTSetSubNode, ASTSetXorNode, ASTSizeFunction, ASTSizeMethod, ASTStringLiteral, ASTSubNode, ASTSWNode, ASTTernaryNode, ASTTrueNode, ASTUnaryMinusNode, ASTWhileStatement

      public abstract class JexlNode
      extends SimpleNode

  Base class for parser nodes - holds an 'image' of the token for later use.
  Since:
    2.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `JexlNode.Constant<T>` A marker interface for constants.

  - ### Field Summary

    - ### Fields inherited from class org.apache.commons.jexl3.parser.SimpleNode

      `id`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JexlNode(int id)`
    `JexlNode(Parser p, int id)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` Clears any cached value of type JexlProperty{G,S}et or JexlMethod.
    `boolean` | `isConstant()` Whether this node is a constant node Its value can not change after the first evaluation and can be cached indefinitely.
    `protected boolean` | `isConstant(boolean literal)`
    `boolean` | `isLeftValue()` Whether this node is a left value.
    `JexlInfo` | `jexlInfo()` Gets the associated JexlInfo instance.
    `void` | `jjtSetFirstToken(Token t)`
    `void` | `jjtSetLastToken(Token t)`

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

      `childrenAccept, dump, jjtAccept, 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

    - #### JexlNode

          public JexlNode(int id)

    - #### JexlNode

          public JexlNode(Parser p,
                  int id)

  - ### Method Detail

    - #### jjtSetFirstToken

          public void jjtSetFirstToken(Token t)

    - #### jjtSetLastToken

          public void jjtSetLastToken(Token t)

    - #### jexlInfo

          public JexlInfo jexlInfo()

      Gets the associated JexlInfo instance.
      Returns:
        the info

    - #### clearCache

          public void clearCache()

      Clears any cached value of type JexlProperty{G,S}et or JexlMethod.

      This is called when the engine detects the evaluation of a script occurs with a class loader different that the one that created it.

    - #### isConstant

          public boolean isConstant()

      Whether this node is a constant node Its value can not change after the first evaluation and can be cached indefinitely.
      Returns:
        true if constant, false otherwise

    - #### isConstant

          protected boolean isConstant(boolean literal)

    - #### isLeftValue

          public boolean isLeftValue()

      Whether this node is a left value.
      Returns:
        true if node is assignable, false otherwise

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