KickJava   Java API By Example, From Geeks To Geeks.

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


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 AFieldSignature extends PFieldSignature
9 {
10     private TCmplt _cmplt_;
11     private PClassName _className_;
12     private TColon _first_;
13     private PType _type_;
14     private PName _fieldName_;
15     private TCmpgt _cmpgt_;
16
17     public AFieldSignature()
18     {
19     }
20
21     public AFieldSignature(
22         TCmplt _cmplt_,
23         PClassName _className_,
24         TColon _first_,
25         PType _type_,
26         PName _fieldName_,
27         TCmpgt _cmpgt_)
28     {
29         setCmplt(_cmplt_);
30
31         setClassName(_className_);
32
33         setFirst(_first_);
34
35         setType(_type_);
36
37         setFieldName(_fieldName_);
38
39         setCmpgt(_cmpgt_);
40
41     }
42     public Object JavaDoc clone()
43     {
44         return new AFieldSignature(
45             (TCmplt) cloneNode(_cmplt_),
46             (PClassName) cloneNode(_className_),
47             (TColon) cloneNode(_first_),
48             (PType) cloneNode(_type_),
49             (PName) cloneNode(_fieldName_),
50             (TCmpgt) cloneNode(_cmpgt_));
51     }
52
53     public void apply(Switch sw)
54     {
55         ((Analysis) sw).caseAFieldSignature(this);
56     }
57
58     public TCmplt getCmplt()
59     {
60         return _cmplt_;
61     }
62
63     public void setCmplt(TCmplt node)
64     {
65         if(_cmplt_ != null)
66         {
67             _cmplt_.parent(null);
68         }
69
70         if(node != null)
71         {
72             if(node.parent() != null)
73             {
74                 node.parent().removeChild(node);
75             }
76
77             node.parent(this);
78         }
79
80         _cmplt_ = node;
81     }
82
83     public PClassName getClassName()
84     {
85         return _className_;
86     }
87
88     public void setClassName(PClassName node)
89     {
90         if(_className_ != null)
91         {
92             _className_.parent(null);
93         }
94
95         if(node != null)
96         {
97             if(node.parent() != null)
98             {
99                 node.parent().removeChild(node);
100             }
101
102             node.parent(this);
103         }
104
105         _className_ = node;
106     }
107
108     public TColon getFirst()
109     {
110         return _first_;
111     }
112
113     public void setFirst(TColon node)
114     {
115         if(_first_ != null)
116         {
117             _first_.parent(null);
118         }
119
120         if(node != null)
121         {
122             if(node.parent() != null)
123             {
124                 node.parent().removeChild(node);
125             }
126
127             node.parent(this);
128         }
129
130         _first_ = node;
131     }
132
133     public PType getType()
134     {
135         return _type_;
136     }
137
138     public void setType(PType node)
139     {
140         if(_type_ != null)
141         {
142             _type_.parent(null);
143         }
144
145         if(node != null)
146         {
147             if(node.parent() != null)
148             {
149                 node.parent().removeChild(node);
150             }
151
152             node.parent(this);
153         }
154
155         _type_ = node;
156     }
157
158     public PName getFieldName()
159     {
160         return _fieldName_;
161     }
162
163     public void setFieldName(PName node)
164     {
165         if(_fieldName_ != null)
166         {
167             _fieldName_.parent(null);
168         }
169
170         if(node != null)
171         {
172             if(node.parent() != null)
173             {
174                 node.parent().removeChild(node);
175             }
176
177             node.parent(this);
178         }
179
180         _fieldName_ = node;
181     }
182
183     public TCmpgt getCmpgt()
184     {
185         return _cmpgt_;
186     }
187
188     public void setCmpgt(TCmpgt node)
189     {
190         if(_cmpgt_ != null)
191         {
192             _cmpgt_.parent(null);
193         }
194
195         if(node != null)
196         {
197             if(node.parent() != null)
198             {
199                 node.parent().removeChild(node);
200             }
201
202             node.parent(this);
203         }
204
205         _cmpgt_ = node;
206     }
207
208     public String JavaDoc toString()
209     {
210         return ""
211             + toString(_cmplt_)
212             + toString(_className_)
213             + toString(_first_)
214             + toString(_type_)
215             + toString(_fieldName_)
216             + toString(_cmpgt_);
217     }
218
219     void removeChild(Node child)
220     {
221         if(_cmplt_ == child)
222         {
223             _cmplt_ = null;
224             return;
225         }
226
227         if(_className_ == child)
228         {
229             _className_ = null;
230             return;
231         }
232
233         if(_first_ == child)
234         {
235             _first_ = null;
236             return;
237         }
238
239         if(_type_ == child)
240         {
241             _type_ = null;
242             return;
243         }
244
245         if(_fieldName_ == child)
246         {
247             _fieldName_ = null;
248             return;
249         }
250
251         if(_cmpgt_ == child)
252         {
253             _cmpgt_ = null;
254             return;
255         }
256
257     }
258
259     void replaceChild(Node oldChild, Node newChild)
260     {
261         if(_cmplt_ == oldChild)
262         {
263             setCmplt((TCmplt) newChild);
264             return;
265         }
266
267         if(_className_ == oldChild)
268         {
269             setClassName((PClassName) newChild);
270             return;
271         }
272
273         if(_first_ == oldChild)
274         {
275             setFirst((TColon) newChild);
276             return;
277         }
278
279         if(_type_ == oldChild)
280         {
281             setType((PType) newChild);
282             return;
283         }
284
285         if(_fieldName_ == oldChild)
286         {
287             setFieldName((PName) newChild);
288             return;
289         }
290
291         if(_cmpgt_ == oldChild)
292         {
293             setCmpgt((TCmpgt) newChild);
294             return;
295         }
296
297     }
298 }
299
Popular Tags