KickJava   Java API By Example, From Geeks To Geeks.

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


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 AIdentityStatement extends PStatement
9 {
10     private PLocalName _localName_;
11     private TColonEquals _colonEquals_;
12     private TAtIdentifier _atIdentifier_;
13     private PType _type_;
14     private TSemicolon _semicolon_;
15
16     public AIdentityStatement()
17     {
18     }
19
20     public AIdentityStatement(
21         PLocalName _localName_,
22         TColonEquals _colonEquals_,
23         TAtIdentifier _atIdentifier_,
24         PType _type_,
25         TSemicolon _semicolon_)
26     {
27         setLocalName(_localName_);
28
29         setColonEquals(_colonEquals_);
30
31         setAtIdentifier(_atIdentifier_);
32
33         setType(_type_);
34
35         setSemicolon(_semicolon_);
36
37     }
38     public Object JavaDoc clone()
39     {
40         return new AIdentityStatement(
41             (PLocalName) cloneNode(_localName_),
42             (TColonEquals) cloneNode(_colonEquals_),
43             (TAtIdentifier) cloneNode(_atIdentifier_),
44             (PType) cloneNode(_type_),
45             (TSemicolon) cloneNode(_semicolon_));
46     }
47
48     public void apply(Switch sw)
49     {
50         ((Analysis) sw).caseAIdentityStatement(this);
51     }
52
53     public PLocalName getLocalName()
54     {
55         return _localName_;
56     }
57
58     public void setLocalName(PLocalName node)
59     {
60         if(_localName_ != null)
61         {
62             _localName_.parent(null);
63         }
64
65         if(node != null)
66         {
67             if(node.parent() != null)
68             {
69                 node.parent().removeChild(node);
70             }
71
72             node.parent(this);
73         }
74
75         _localName_ = node;
76     }
77
78     public TColonEquals getColonEquals()
79     {
80         return _colonEquals_;
81     }
82
83     public void setColonEquals(TColonEquals node)
84     {
85         if(_colonEquals_ != null)
86         {
87             _colonEquals_.parent(null);
88         }
89
90         if(node != null)
91         {
92             if(node.parent() != null)
93             {
94                 node.parent().removeChild(node);
95             }
96
97             node.parent(this);
98         }
99
100         _colonEquals_ = node;
101     }
102
103     public TAtIdentifier getAtIdentifier()
104     {
105         return _atIdentifier_;
106     }
107
108     public void setAtIdentifier(TAtIdentifier node)
109     {
110         if(_atIdentifier_ != null)
111         {
112             _atIdentifier_.parent(null);
113         }
114
115         if(node != null)
116         {
117             if(node.parent() != null)
118             {
119                 node.parent().removeChild(node);
120             }
121
122             node.parent(this);
123         }
124
125         _atIdentifier_ = node;
126     }
127
128     public PType getType()
129     {
130         return _type_;
131     }
132
133     public void setType(PType node)
134     {
135         if(_type_ != null)
136         {
137             _type_.parent(null);
138         }
139
140         if(node != null)
141         {
142             if(node.parent() != null)
143             {
144                 node.parent().removeChild(node);
145             }
146
147             node.parent(this);
148         }
149
150         _type_ = node;
151     }
152
153     public TSemicolon getSemicolon()
154     {
155         return _semicolon_;
156     }
157
158     public void setSemicolon(TSemicolon node)
159     {
160         if(_semicolon_ != null)
161         {
162             _semicolon_.parent(null);
163         }
164
165         if(node != null)
166         {
167             if(node.parent() != null)
168             {
169                 node.parent().removeChild(node);
170             }
171
172             node.parent(this);
173         }
174
175         _semicolon_ = node;
176     }
177
178     public String JavaDoc toString()
179     {
180         return ""
181             + toString(_localName_)
182             + toString(_colonEquals_)
183             + toString(_atIdentifier_)
184             + toString(_type_)
185             + toString(_semicolon_);
186     }
187
188     void removeChild(Node child)
189     {
190         if(_localName_ == child)
191         {
192             _localName_ = null;
193             return;
194         }
195
196         if(_colonEquals_ == child)
197         {
198             _colonEquals_ = null;
199             return;
200         }
201
202         if(_atIdentifier_ == child)
203         {
204             _atIdentifier_ = null;
205             return;
206         }
207
208         if(_type_ == child)
209         {
210             _type_ = null;
211             return;
212         }
213
214         if(_semicolon_ == child)
215         {
216             _semicolon_ = null;
217             return;
218         }
219
220     }
221
222     void replaceChild(Node oldChild, Node newChild)
223     {
224         if(_localName_ == oldChild)
225         {
226             setLocalName((PLocalName) newChild);
227             return;
228         }
229
230         if(_colonEquals_ == oldChild)
231         {
232             setColonEquals((TColonEquals) newChild);
233             return;
234         }
235
236         if(_atIdentifier_ == oldChild)
237         {
238             setAtIdentifier((TAtIdentifier) newChild);
239             return;
240         }
241
242         if(_type_ == oldChild)
243         {
244             setType((PType) newChild);
245             return;
246         }
247
248         if(_semicolon_ == oldChild)
249         {
250             setSemicolon((TSemicolon) newChild);
251             return;
252         }
253
254     }
255 }
256
Popular Tags