| 42 | |
| 43 | */ |
| 44 | class SimpleNode implements Node |
| 45 | { |
| 46 | public static SimpleNode JAVACODE = |
| 47 | new SimpleNode( -1 ) { |
| 48 | public String getSourceFile() { |
| 49 | return "<Called from Java Code>"; |
| 50 | } |
| 51 | |
| 52 | public int getLineNumber() { |
| 53 | return -1; |
| 54 | } |
| 55 | |
| 56 | public String getText() { |
| 57 | return "<Compiled Java Code>"; |
| 58 | } |
| 59 | }; |
| 60 | |
| 61 | protected Node parent; |
| 62 | protected Node[] children; |
| 63 | protected int id; |
| 64 | Token firstToken, lastToken; |
| 65 | |
| 66 | /** the source of the text from which this was parsed */ |
| 67 | String sourceFile; |
| 68 | |
| 69 | public SimpleNode(int i) { |
| 70 | id = i; |
| 71 | } |
| 72 | |
| 73 | public void jjtOpen() { } |
| 74 | public void jjtClose() { } |
| 75 | |
| 76 | public void jjtSetParent(Node n) { parent = n; } |
| 77 | public Node jjtGetParent() { return parent; } |
| 78 | //public SimpleNode getParent() { return (SimpleNode)parent; } |
| 79 | |
| 80 | public void jjtAddChild(Node n, int i) |
| 81 | { |
| 82 | if (children == null) |
| 83 | children = new Node[i + 1]; |
| 84 | else |
| 85 | if (i >= children.length) |
| 86 | { |
| 87 | Node c[] = new Node[i + 1]; |
| 88 | System.arraycopy(children, 0, c, 0, children.length); |
| 89 | children = c; |
| 90 | } |
| 91 | |
| 92 | children[i] = n; |
| 93 | } |
| 94 | |
| 95 | public Node jjtGetChild(int i) { |
| 96 | return children[i]; |
| 97 | } |
| 98 | public SimpleNode getChild( int i ) { |
| 99 | return (SimpleNode)jjtGetChild(i); |
| 100 | } |
| 101 |
nothing calls this directly
no outgoing calls
no test coverage detected