KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > ASTNULLType


1 package antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/RIGHTS.html
6  *
7  * $Id: //depot/code/org.antlr/main/main/antlr/ASTNULLType.java#5 $
8  */

9
10 import antlr.collections.AST;
11 import antlr.collections.ASTEnumeration;
12 import antlr.Token;
13
14 /** There is only one instance of this class **/
15 public class ASTNULLType implements AST {
16     public void addChild(AST c) {
17     }
18
19     public boolean equals(AST t) {
20         return false;
21     }
22
23     public boolean equalsList(AST t) {
24         return false;
25     }
26
27     public boolean equalsListPartial(AST t) {
28         return false;
29     }
30
31     public boolean equalsTree(AST t) {
32         return false;
33     }
34
35     public boolean equalsTreePartial(AST t) {
36         return false;
37     }
38
39     public ASTEnumeration findAll(AST tree) {
40         return null;
41     }
42
43     public ASTEnumeration findAllPartial(AST subtree) {
44         return null;
45     }
46
47     public AST getFirstChild() {
48         return this;
49     }
50
51     public AST getNextSibling() {
52         return this;
53     }
54
55     public String JavaDoc getText() {
56         return "<ASTNULL>";
57     }
58
59     public int getType() {
60         return Token.NULL_TREE_LOOKAHEAD;
61     }
62
63     public void initialize(int t, String JavaDoc txt) {
64     }
65
66     public void initialize(AST t) {
67     }
68
69     public void initialize(Token t) {
70     }
71
72     public void setFirstChild(AST c) {
73     }
74
75     public void setNextSibling(AST n) {
76     }
77
78     public void setText(String JavaDoc text) {
79     }
80
81     public void setType(int ttype) {
82     }
83
84     public String JavaDoc toString() {
85         return getText();
86     }
87
88     public String JavaDoc toStringList() {
89         return getText();
90     }
91
92     public String JavaDoc toStringTree() {
93         return getText();
94     }
95 }
96
Popular Tags