001 /* Generated By:JJTree: Do not edit this line. Node.java */
002
003 package net.sourceforge.javajson.parser;
004
005 /* All AST nodes must implement this interface. It provides basic
006 machinery for constructing the parent and child relationships
007 between nodes. */
008
009 public interface Node {
010
011 /** This method is called after the node has been made the current
012 node. It indicates that child nodes can now be added to it. */
013 public void jjtOpen();
014
015 /** This method is called after all the child nodes have been
016 added. */
017 public void jjtClose();
018
019 /** This pair of methods are used to inform the node of its
020 parent. */
021 public void jjtSetParent(Node n);
022 public Node jjtGetParent();
023
024 /** This method tells the node to add its argument to the node's
025 list of children. */
026 public void jjtAddChild(Node n, int i);
027
028 /** This method returns a child node. The children are numbered
029 from zero, left to right. */
030 public Node jjtGetChild(int i);
031
032 /** Return the number of children the node has. */
033 public int jjtGetNumChildren();
034 }