1 | /* This file was generated by SableCC (http://www.sablecc.org/). */ |
2 | |
3 | package uk.co.zonetora.fj.ast.node; |
4 | |
5 | import java.util.*; |
6 | import uk.co.zonetora.fj.ast.analysis.*; |
7 | |
8 | public final class AMethodCallTerm extends PTerm |
9 | { |
10 | private PNonLeftRecTerm _nonLeftRecTerm_; |
11 | private TPeriod _period_; |
12 | private TIdentifier _identifier_; |
13 | private TLPar _lPar_; |
14 | private PTermList _termList_; |
15 | private TRPar _rPar_; |
16 | |
17 | public AMethodCallTerm() |
18 | { |
19 | } |
20 | |
21 | public AMethodCallTerm( |
22 | PNonLeftRecTerm _nonLeftRecTerm_, |
23 | TPeriod _period_, |
24 | TIdentifier _identifier_, |
25 | TLPar _lPar_, |
26 | PTermList _termList_, |
27 | TRPar _rPar_) |
28 | { |
29 | setNonLeftRecTerm(_nonLeftRecTerm_); |
30 | |
31 | setPeriod(_period_); |
32 | |
33 | setIdentifier(_identifier_); |
34 | |
35 | setLPar(_lPar_); |
36 | |
37 | setTermList(_termList_); |
38 | |
39 | setRPar(_rPar_); |
40 | |
41 | } |
42 | public Object clone() |
43 | { |
44 | return new AMethodCallTerm( |
45 | (PNonLeftRecTerm) cloneNode(_nonLeftRecTerm_), |
46 | (TPeriod) cloneNode(_period_), |
47 | (TIdentifier) cloneNode(_identifier_), |
48 | (TLPar) cloneNode(_lPar_), |
49 | (PTermList) cloneNode(_termList_), |
50 | (TRPar) cloneNode(_rPar_)); |
51 | } |
52 | |
53 | public void apply(Switch sw) |
54 | { |
55 | ((Analysis) sw).caseAMethodCallTerm(this); |
56 | } |
57 | |
58 | public PNonLeftRecTerm getNonLeftRecTerm() |
59 | { |
60 | return _nonLeftRecTerm_; |
61 | } |
62 | |
63 | public void setNonLeftRecTerm(PNonLeftRecTerm node) |
64 | { |
65 | if(_nonLeftRecTerm_ != null) |
66 | { |
67 | _nonLeftRecTerm_.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 | _nonLeftRecTerm_ = node; |
81 | } |
82 | |
83 | public TPeriod getPeriod() |
84 | { |
85 | return _period_; |
86 | } |
87 | |
88 | public void setPeriod(TPeriod node) |
89 | { |
90 | if(_period_ != null) |
91 | { |
92 | _period_.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 | _period_ = node; |
106 | } |
107 | |
108 | public TIdentifier getIdentifier() |
109 | { |
110 | return _identifier_; |
111 | } |
112 | |
113 | public void setIdentifier(TIdentifier node) |
114 | { |
115 | if(_identifier_ != null) |
116 | { |
117 | _identifier_.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 | _identifier_ = node; |
131 | } |
132 | |
133 | public TLPar getLPar() |
134 | { |
135 | return _lPar_; |
136 | } |
137 | |
138 | public void setLPar(TLPar node) |
139 | { |
140 | if(_lPar_ != null) |
141 | { |
142 | _lPar_.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 | _lPar_ = node; |
156 | } |
157 | |
158 | public PTermList getTermList() |
159 | { |
160 | return _termList_; |
161 | } |
162 | |
163 | public void setTermList(PTermList node) |
164 | { |
165 | if(_termList_ != null) |
166 | { |
167 | _termList_.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 | _termList_ = node; |
181 | } |
182 | |
183 | public TRPar getRPar() |
184 | { |
185 | return _rPar_; |
186 | } |
187 | |
188 | public void setRPar(TRPar node) |
189 | { |
190 | if(_rPar_ != null) |
191 | { |
192 | _rPar_.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 | _rPar_ = node; |
206 | } |
207 | |
208 | public String toString() |
209 | { |
210 | return "" |
211 | + toString(_nonLeftRecTerm_) |
212 | + toString(_period_) |
213 | + toString(_identifier_) |
214 | + toString(_lPar_) |
215 | + toString(_termList_) |
216 | + toString(_rPar_); |
217 | } |
218 | |
219 | void removeChild(Node child) |
220 | { |
221 | if(_nonLeftRecTerm_ == child) |
222 | { |
223 | _nonLeftRecTerm_ = null; |
224 | return; |
225 | } |
226 | |
227 | if(_period_ == child) |
228 | { |
229 | _period_ = null; |
230 | return; |
231 | } |
232 | |
233 | if(_identifier_ == child) |
234 | { |
235 | _identifier_ = null; |
236 | return; |
237 | } |
238 | |
239 | if(_lPar_ == child) |
240 | { |
241 | _lPar_ = null; |
242 | return; |
243 | } |
244 | |
245 | if(_termList_ == child) |
246 | { |
247 | _termList_ = null; |
248 | return; |
249 | } |
250 | |
251 | if(_rPar_ == child) |
252 | { |
253 | _rPar_ = null; |
254 | return; |
255 | } |
256 | |
257 | } |
258 | |
259 | void replaceChild(Node oldChild, Node newChild) |
260 | { |
261 | if(_nonLeftRecTerm_ == oldChild) |
262 | { |
263 | setNonLeftRecTerm((PNonLeftRecTerm) newChild); |
264 | return; |
265 | } |
266 | |
267 | if(_period_ == oldChild) |
268 | { |
269 | setPeriod((TPeriod) newChild); |
270 | return; |
271 | } |
272 | |
273 | if(_identifier_ == oldChild) |
274 | { |
275 | setIdentifier((TIdentifier) newChild); |
276 | return; |
277 | } |
278 | |
279 | if(_lPar_ == oldChild) |
280 | { |
281 | setLPar((TLPar) newChild); |
282 | return; |
283 | } |
284 | |
285 | if(_termList_ == oldChild) |
286 | { |
287 | setTermList((PTermList) newChild); |
288 | return; |
289 | } |
290 | |
291 | if(_rPar_ == oldChild) |
292 | { |
293 | setRPar((TRPar) newChild); |
294 | return; |
295 | } |
296 | |
297 | } |
298 | } |