Class SimpleNode

java.lang.Object
org.apache.commons.jexl2.parser.SimpleNode
All Implemented Interfaces:
Node
Direct Known Subclasses:
JexlNode

public class SimpleNode extends Object implements Node
A class originally generated by JJTree with the following JavaCCOptions: MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY= Works around issue https://javacc.dev.java.net/issues/show_bug.cgi?id=227 As soon as this issue if fixed and the maven plugin uses the correct version of Javacc, this class can go away. The technical goal is to ensure every reference made in the parser was to a JexlNode; unfortunately, as in javacc 4.1, it still uses a SimpleNode reference in the generated ParserVisitor. Besides, there is no need to keep the parser around in the node. The functional goal is to a allow a volatile value in the node so it can serve as a last evaluation cache even in multi-threaded executions.
  • Field Details

    • parent

      protected JexlNode parent
      The parent node.
    • children

      protected JexlNode[] children
      The array of children nodes.
    • id

      protected final int id
      The node type id.
    • value

      protected volatile Object value
      volatile value so it can be used as a last evaluation cache.
  • Constructor Details

    • SimpleNode

      public SimpleNode(int i)
      Creates a SimpleNode instance.
      Parameters:
      i - the node type identifier
    • SimpleNode

      public SimpleNode(Parser p, int i)
      Creates a SimpleNode instance.
      Parameters:
      p - the parser instance
      i - the node type identifier
  • Method Details