KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > ASTNULLType


1 package persistence.antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/license.html
6  *
7  */

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