| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Node |
|
| 0.0;0 |
| 1 | package org.webslinger.rules; | |
| 2 | ||
| 3 | import java.util.ListIterator; | |
| 4 | ||
| 5 | /* All AST nodes must implement this interface. It provides basic | |
| 6 | machinery for constructing the parent and child relationships | |
| 7 | between nodes. */ | |
| 8 | ||
| 9 | public interface Node extends Iterable<Node> { | |
| 10 | ||
| 11 | /** This method is called after the node has been made the current | |
| 12 | node. It indicates that child nodes can now be added to it. */ | |
| 13 | void jjtOpen(); | |
| 14 | ||
| 15 | /** This method is called after all the child nodes have been | |
| 16 | added. */ | |
| 17 | void jjtClose(); | |
| 18 | ||
| 19 | /** This pair of methods are used to inform the node of its | |
| 20 | parent. */ | |
| 21 | void jjtSetParent(Node n); | |
| 22 | Node jjtGetParent(); | |
| 23 | ||
| 24 | /** This method tells the node to add its argument to the node's | |
| 25 | list of children. */ | |
| 26 | void jjtAddChild(Node n, int i); | |
| 27 | ||
| 28 | /** This method returns a child node. The children are numbered | |
| 29 | from zero, left to right. */ | |
| 30 | Node jjtGetChild(int i); | |
| 31 | ||
| 32 | /** Return the number of children the node has. */ | |
| 33 | int jjtGetNumChildren(); | |
| 34 | ||
| 35 | ListIterator<Node> getChildrenIterator(); | |
| 36 | ListIterator<Node> iterator(); | |
| 37 | ||
| 38 | /** Accept the visitor. **/ | |
| 39 | Object jjtAccept(RulesVisitor visitor, Object data); | |
| 40 | } |