KickJava   Java API By Example, From Geeks To Geeks.

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


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 AMethodSignature extends PMethodSignature
9 {
10     private TCmplt _cmplt_;
11     private PClassName _className_;
12     private TColon _first_;
13     private PType _type_;
14     private PName _methodName_;
15     private TLParen _lParen_;
16     private PParameterList _parameterList_;
17     private TRParen _rParen_;
18     private TCmpgt _cmpgt_;
19
20     public AMethodSignature()
21     {
22     }
23
24     public AMethodSignature(
25         TCmplt _cmplt_,
26         PClassName _className_,
27         TColon _first_,
28         PType _type_,
29         PName _methodName_,
30         TLParen _lParen_,
31         PParameterList _parameterList_,
32         TRParen _rParen_,
33         TCmpgt _cmpgt_)
34     {
35         setCmplt(_cmplt_);
36
37         setClassName(_className_);
38
39         setFirst(_first_);
40
41         setType(_type_);
42
43         setMethodName(_methodName_);
44
45         setLParen(_lParen_);
46
47         setParameterList(_parameterList_);
48
49         setRParen(_rParen_);
50
51         setCmpgt(_cmpgt_);
52
53     }
54     public Object JavaDoc clone()
55     {
56         return new AMethodSignature(
57             (TCmplt) cloneNode(_cmplt_),
58             (PClassName) cloneNode(_className_),
59             (TColon) cloneNode(_first_),
60             (PType) cloneNode(_type_),
61             (PName) cloneNode(_methodName_),
62             (TLParen) cloneNode(_lParen_),
63             (PParameterList) cloneNode(_parameterList_),
64             (TRParen) cloneNode(_rParen_),
65             (TCmpgt) cloneNode(_cmpgt_));
66     }
67
68     public void apply(Switch sw)
69     {
70         ((Analysis) sw).caseAMethodSignature(this);
71     }
72
73     public TCmplt getCmplt()
74     {
75         return _cmplt_;
76     }
77
78     public void setCmplt(TCmplt node)
79     {
80         if(_cmplt_ != null)
81         {
82             _cmplt_.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         _cmplt_ = node;
96     }
97
98     public PClassName getClassName()
99     {
100         return _className_;
101     }
102
103     public void setClassName(PClassName node)
104     {
105         if(_className_ != null)
106         {
107             _className_.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         _className_ = node;
121     }
122
123     public TColon getFirst()
124     {
125         return _first_;
126     }
127
128     public void setFirst(TColon node)
129     {
130         if(_first_ != null)
131         {
132             _first_.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         _first_ = node;
146     }
147
148     public PType getType()
149     {
150         return _type_;
151     }
152
153     public void setType(PType node)
154     {
155         if(_type_ != null)
156         {
157             _type_.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         _type_ = node;
171     }
172
173     public PName getMethodName()
174     {
175         return _methodName_;
176     }
177
178     public void setMethodName(PName node)
179     {
180         if(_methodName_ != null)
181         {
182             _methodName_.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         _methodName_ = node;
196     }
197
198     public TLParen getLParen()
199     {
200         return _lParen_;
201     }
202
203     public void setLParen(TLParen node)
204     {
205         if(_lParen_ != null)
206         {
207             _lParen_.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         _lParen_ = node;
221     }
222
223     public PParameterList getParameterList()
224     {
225         return _parameterList_;
226     }
227
228     public void setParameterList(PParameterList node)
229     {
230         if(_parameterList_ != null)
231         {
232             _parameterList_.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         _parameterList_ = node;
246     }
247
248     public TRParen getRParen()
249     {
250         return _rParen_;
251     }
252
253     public void setRParen(TRParen node)
254     {
255         if(_rParen_ != null)
256         {
257             _rParen_.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         _rParen_ = node;
271     }
272
273     public TCmpgt getCmpgt()
274     {
275         return _cmpgt_;
276     }
277
278     public void setCmpgt(TCmpgt node)
279     {
280         if(_cmpgt_ != null)
281         {
282             _cmpgt_.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         _cmpgt_ = node;
296     }
297
298     public String JavaDoc toString()
299     {
300         return ""
301             + toString(_cmplt_)
302             + toString(_className_)
303             + toString(_first_)
304             + toString(_type_)
305             + toString(_methodName_)
306             + toString(_lParen_)
307             + toString(_parameterList_)
308             + toString(_rParen_)
309             + toString(_cmpgt_);
310     }
311
312     void removeChild(Node child)
313     {
314         if(_cmplt_ == child)
315         {
316             _cmplt_ = null;
317             return;
318         }
319
320         if(_className_ == child)
321         {
322             _className_ = null;
323             return;
324         }
325
326         if(_first_ == child)
327         {
328             _first_ = null;
329             return;
330         }
331
332         if(_type_ == child)
333         {
334             _type_ = null;
335             return;
336         }
337
338         if(_methodName_ == child)
339         {
340             _methodName_ = null;
341             return;
342         }
343
344         if(_lParen_ == child)
345         {
346             _lParen_ = null;
347             return;
348         }
349
350         if(_parameterList_ == child)
351         {
352             _parameterList_ = null;
353             return;
354         }
355
356         if(_rParen_ == child)
357         {
358             _rParen_ = null;
359             return;
360         }
361
362         if(_cmpgt_ == child)
363         {
364             _cmpgt_ = null;
365             return;
366         }
367
368     }
369
370     void replaceChild(Node oldChild, Node newChild)
371     {
372         if(_cmplt_ == oldChild)
373         {
374             setCmplt((TCmplt) newChild);
375             return;
376         }
377
378         if(_className_ == oldChild)
379         {
380             setClassName((PClassName) newChild);
381             return;
382         }
383
384         if(_first_ == oldChild)
385         {
386             setFirst((TColon) newChild);
387             return;
388         }
389
390         if(_type_ == oldChild)
391         {
392             setType((PType) newChild);
393             return;
394         }
395
396         if(_methodName_ == oldChild)
397         {
398             setMethodName((PName) newChild);
399             return;
400         }
401
402         if(_lParen_ == oldChild)
403         {
404             setLParen((TLParen) newChild);
405             return;
406         }
407
408         if(_parameterList_ == oldChild)
409         {
410             setParameterList((PParameterList) newChild);
411             return;
412         }
413
414         if(_rParen_ == oldChild)
415         {
416             setRParen((TRParen) newChild);
417             return;
418         }
419
420         if(_cmpgt_ == oldChild)
421         {
422             setCmpgt((TCmpgt) newChild);
423             return;
424         }
425
426     }
427 }
428
Popular Tags