01: /* Generated By:JJTree: Do not edit this line. Node.java */
02:
03: package net.sourceforge.pmd.ast;
04:
05: /* All AST nodes must implement this interface. It provides basic
06: machinery for constructing the parent and child relationships
07: between nodes. */
08:
09: public interface Node {
10:
11: /**
12: * This method is called after the node has been made the current
13: * node. It indicates that child nodes can now be added to it.
14: */
15: public void jjtOpen();
16:
17: /**
18: * This method is called after all the child nodes have been
19: * added.
20: */
21: public void jjtClose();
22:
23: /**
24: * This pair of methods are used to inform the node of its
25: * parent.
26: */
27: public void jjtSetParent(Node n);
28:
29: public Node jjtGetParent();
30:
31: /**
32: * This method tells the node to add its argument to the node's
33: * list of children.
34: */
35: public void jjtAddChild(Node n, int i);
36:
37: /**
38: * This method returns a child node. The children are numbered
39: * from zero, left to right.
40: *
41: * @param i the child index. Must be nonnegative and less than
42: * {@link #jjtGetNumChildren}.
43: */
44: public Node jjtGetChild(int i);
45:
46: /**
47: * Return the number of children the node has.
48: */
49: public int jjtGetNumChildren();
50:
51: }
|