KickJava   Java API By Example, From Geeks To Geeks.

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


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 ACatchClause extends PCatchClause
9 {
10     private TCatch _catch_;
11     private PClassName _name_;
12     private TFrom _from_;
13     private PLabelName _fromLabel_;
14     private TTo _to_;
15     private PLabelName _toLabel_;
16     private TWith _with_;
17     private PLabelName _withLabel_;
18     private TSemicolon _semicolon_;
19
20     public ACatchClause()
21     {
22     }
23
24     public ACatchClause(
25         TCatch _catch_,
26         PClassName _name_,
27         TFrom _from_,
28         PLabelName _fromLabel_,
29         TTo _to_,
30         PLabelName _toLabel_,
31         TWith _with_,
32         PLabelName _withLabel_,
33         TSemicolon _semicolon_)
34     {
35         setCatch(_catch_);
36
37         setName(_name_);
38
39         setFrom(_from_);
40
41         setFromLabel(_fromLabel_);
42
43         setTo(_to_);
44
45         setToLabel(_toLabel_);
46
47         setWith(_with_);
48
49         setWithLabel(_withLabel_);
50
51         setSemicolon(_semicolon_);
52
53     }
54     public Object JavaDoc clone()
55     {
56         return new ACatchClause(
57             (TCatch) cloneNode(_catch_),
58             (PClassName) cloneNode(_name_),
59             (TFrom) cloneNode(_from_),
60             (PLabelName) cloneNode(_fromLabel_),
61             (TTo) cloneNode(_to_),
62             (PLabelName) cloneNode(_toLabel_),
63             (TWith) cloneNode(_with_),
64             (PLabelName) cloneNode(_withLabel_),
65             (TSemicolon) cloneNode(_semicolon_));
66     }
67
68     public void apply(Switch sw)
69     {
70         ((Analysis) sw).caseACatchClause(this);
71     }
72
73     public TCatch getCatch()
74     {
75         return _catch_;
76     }
77
78     public void setCatch(TCatch node)
79     {
80         if(_catch_ != null)
81         {
82             _catch_.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         _catch_ = node;
96     }
97
98     public PClassName getName()
99     {
100         return _name_;
101     }
102
103     public void setName(PClassName node)
104     {
105         if(_name_ != null)
106         {
107             _name_.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         _name_ = node;
121     }
122
123     public TFrom getFrom()
124     {
125         return _from_;
126     }
127
128     public void setFrom(TFrom node)
129     {
130         if(_from_ != null)
131         {
132             _from_.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         _from_ = node;
146     }
147
148     public PLabelName getFromLabel()
149     {
150         return _fromLabel_;
151     }
152
153     public void setFromLabel(PLabelName node)
154     {
155         if(_fromLabel_ != null)
156         {
157             _fromLabel_.parent(null);
158         }
159
160         if(node != null)
161         {
162             if(node.parent() != null)
163             {
164                 node.parent().removeChild(node);
165             }
166
167             node.parent(this);
168         }
169
170         _fromLabel_ = node;
171     }
172
173     public TTo getTo()
174     {
175         return _to_;
176     }
177
178     public void setTo(TTo node)
179     {
180         if(_to_ != null)
181         {
182             _to_.parent(null);
183         }
184
185         if(node != null)
186         {
187             if(node.parent() != null)
188             {
189                 node.parent().removeChild(node);
190             }
191
192             node.parent(this);
193         }
194
195         _to_ = node;
196     }
197
198     public PLabelName getToLabel()
199     {
200         return _toLabel_;
201     }
202
203     public void setToLabel(PLabelName node)
204     {
205         if(_toLabel_ != null)
206         {
207             _toLabel_.parent(null);
208         }
209
210         if(node != null)
211         {
212             if(node.parent() != null)
213             {
214                 node.parent().removeChild(node);
215             }
216
217             node.parent(this);
218         }
219
220         _toLabel_ = node;
221     }
222
223     public TWith getWith()
224     {
225         return _with_;
226     }
227
228     public void setWith(TWith node)
229     {
230         if(_with_ != null)
231         {
232             _with_.parent(null);
233         }
234
235         if(node != null)
236         {
237             if(node.parent() != null)
238             {
239                 node.parent().removeChild(node);
240             }
241
242             node.parent(this);
243         }
244
245         _with_ = node;
246     }
247
248     public PLabelName getWithLabel()
249     {
250         return _withLabel_;
251     }
252
253     public void setWithLabel(PLabelName node)
254     {
255         if(_withLabel_ != null)
256         {
257             _withLabel_.parent(null);
258         }
259
260         if(node != null)
261         {
262             if(node.parent() != null)
263             {
264                 node.parent().removeChild(node);
265             }
266
267             node.parent(this);
268         }
269
270         _withLabel_ = node;
271     }
272
273     public TSemicolon getSemicolon()
274     {
275         return _semicolon_;
276     }
277
278     public void setSemicolon(TSemicolon node)
279     {
280         if(_semicolon_ != null)
281         {
282             _semicolon_.parent(null);
283         }
284
285         if(node != null)
286         {
287             if(node.parent() != null)
288             {
289                 node.parent().removeChild(node);
290             }
291
292             node.parent(this);
293         }
294
295         _semicolon_ = node;
296     }
297
298     public String JavaDoc toString()
299     {
300         return ""
301             + toString(_catch_)
302             + toString(_name_)
303             + toString(_from_)
304             + toString(_fromLabel_)
305             + toString(_to_)
306             + toString(_toLabel_)
307             + toString(_with_)
308             + toString(_withLabel_)
309             + toString(_semicolon_);
310     }
311
312     void removeChild(Node child)
313     {
314         if(_catch_ == child)
315         {
316             _catch_ = null;
317             return;
318         }
319
320         if(_name_ == child)
321         {
322             _name_ = null;
323             return;
324         }
325
326         if(_from_ == child)
327         {
328             _from_ = null;
329             return;
330         }
331
332         if(_fromLabel_ == child)
333         {
334             _fromLabel_ = null;
335             return;
336         }
337
338         if(_to_ == child)
339         {
340             _to_ = null;
341             return;
342         }
343
344         if(_toLabel_ == child)
345         {
346             _toLabel_ = null;
347             return;
348         }
349
350         if(_with_ == child)
351         {
352             _with_ = null;
353             return;
354         }
355
356         if(_withLabel_ == child)
357         {
358             _withLabel_ = null;
359             return;
360         }
361
362         if(_semicolon_ == child)
363         {
364             _semicolon_ = null;
365             return;
366         }
367
368     }
369
370     void replaceChild(Node oldChild, Node newChild)
371     {
372         if(_catch_ == oldChild)
373         {
374             setCatch((TCatch) newChild);
375             return;
376         }
377
378         if(_name_ == oldChild)
379         {
380             setName((PClassName) newChild);
381             return;
382         }
383
384         if(_from_ == oldChild)
385         {
386             setFrom((TFrom) newChild);
387             return;
388         }
389
390         if(_fromLabel_ == oldChild)
391         {
392             setFromLabel((PLabelName) newChild);
393             return;
394         }
395
396         if(_to_ == oldChild)
397         {
398             setTo((TTo) newChild);
399             return;
400         }
401
402         if(_toLabel_ == oldChild)
403         {
404             setToLabel((PLabelName) newChild);
405             return;
406         }
407
408         if(_with_ == oldChild)
409         {
410             setWith((TWith) newChild);
411             return;
412         }
413
414         if(_withLabel_ == oldChild)
415         {
416             setWithLabel((PLabelName) newChild);
417             return;
418         }
419
420         if(_semicolon_ == oldChild)
421         {
422             setSemicolon((TSemicolon) newChild);
423             return;
424         }
425
426     }
427 }
428
Popular Tags