KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > soot > jimple > parser > node > AIdentityNoTypeStatement


1 /* This file was generated by SableCC (http://www.sablecc.org/). */
2
3 package soot.jimple.parser.node;
4
5 import java.util.*;
6 import soot.jimple.parser.analysis.*;
7
8 public final class AIdentityNoTypeStatement extends PStatement
9 {
10     private PLocalName _localName_;
11     private TColonEquals _colonEquals_;
12     private TAtIdentifier _atIdentifier_;
13     private TSemicolon _semicolon_;
14
15     public AIdentityNoTypeStatement()
16     {
17     }
18
19     public AIdentityNoTypeStatement(
20         PLocalName _localName_,
21         TColonEquals _colonEquals_,
22         TAtIdentifier _atIdentifier_,
23         TSemicolon _semicolon_)
24     {
25         setLocalName(_localName_);
26
27         setColonEquals(_colonEquals_);
28
29         setAtIdentifier(_atIdentifier_);
30
31         setSemicolon(_semicolon_);
32
33     }
34     public Object JavaDoc clone()
35     {
36         return new AIdentityNoTypeStatement(
37             (PLocalName) cloneNode(_localName_),
38             (TColonEquals) cloneNode(_colonEquals_),
39             (TAtIdentifier) cloneNode(_atIdentifier_),
40             (TSemicolon) cloneNode(_semicolon_));
41     }
42
43     public void apply(Switch sw)
44     {
45         ((Analysis) sw).caseAIdentityNoTypeStatement(this);
46     }
47
48     public PLocalName getLocalName()
49     {
50         return _localName_;
51     }
52
53     public void setLocalName(PLocalName node)
54     {
55         if(_localName_ != null)
56         {
57             _localName_.parent(null);
58         }
59
60         if(node != null)
61         {
62             if(node.parent() != null)
63             {
64                 node.parent().removeChild(node);
65             }
66
67             node.parent(this);
68         }
69
70         _localName_ = node;
71     }
72
73     public TColonEquals getColonEquals()
74     {
75         return _colonEquals_;
76     }
77
78     public void setColonEquals(TColonEquals node)
79     {
80         if(_colonEquals_ != null)
81         {
82             _colonEquals_.parent(null);
83         }
84
85         if(node != null)
86         {
87             if(node.parent() != null)
88             {
89                 node.parent().removeChild(node);
90             }
91
92             node.parent(this);
93         }
94
95         _colonEquals_ = node;
96     }
97
98     public TAtIdentifier getAtIdentifier()
99     {
100         return _atIdentifier_;
101     }
102
103     public void setAtIdentifier(TAtIdentifier node)
104     {
105         if(_atIdentifier_ != null)
106         {
107             _atIdentifier_.parent(null);
108         }
109
110         if(node != null)
111         {
112             if(node.parent() != null)
113             {
114                 node.parent().removeChild(node);
115             }
116
117             node.parent(this);
118         }
119
120         _atIdentifier_ = node;
121     }
122
123     public TSemicolon getSemicolon()
124     {
125         return _semicolon_;
126     }
127
128     public void setSemicolon(TSemicolon node)
129     {
130         if(_semicolon_ != null)
131         {
132             _semicolon_.parent(null);
133         }
134
135         if(node != null)
136         {
137             if(node.parent() != null)
138             {
139                 node.parent().removeChild(node);
140             }
141
142             node.parent(this);
143         }
144
145         _semicolon_ = node;
146     }
147
148     public String JavaDoc toString()
149     {
150         return ""
151             + toString(_localName_)
152             + toString(_colonEquals_)
153             + toString(_atIdentifier_)
154             + toString(_semicolon_);
155     }
156
157     void removeChild(Node child)
158     {
159         if(_localName_ == child)
160         {
161             _localName_ = null;
162             return;
163         }
164
165         if(_colonEquals_ == child)
166         {
167             _colonEquals_ = null;
168             return;
169         }
170
171         if(_atIdentifier_ == child)
172         {
173             _atIdentifier_ = null;
174             return;
175         }
176
177         if(_semicolon_ == child)
178         {
179             _semicolon_ = null;
180             return;
181         }
182
183     }
184
185     void replaceChild(Node oldChild, Node newChild)
186     {
187         if(_localName_ == oldChild)
188         {
189             setLocalName((PLocalName) newChild);
190             return;
191         }
192
193         if(_colonEquals_ == oldChild)
194         {
195             setColonEquals((TColonEquals) newChild);
196             return;
197         }
198
199         if(_atIdentifier_ == oldChild)
200         {
201             setAtIdentifier((TAtIdentifier) newChild);
202             return;
203         }
204
205         if(_semicolon_ == oldChild)
206         {
207             setSemicolon((TSemicolon) newChild);
208             return;
209         }
210
211     }
212 }
213
Popular Tags