|
1 |
| package koala.dynamicjava.tree.visitor; |
|
2 |
| |
|
3 |
| import edu.rice.cs.plt.lambda.Runnable1; |
|
4 |
| import edu.rice.cs.plt.tuple.Option; |
|
5 |
| import edu.rice.cs.plt.tuple.Pair; |
|
6 |
| import koala.dynamicjava.tree.*; |
|
7 |
| import koala.dynamicjava.tree.EnumDeclaration.EnumConstant; |
|
8 |
| import koala.dynamicjava.tree.tiger.GenericReferenceTypeName; |
|
9 |
| import koala.dynamicjava.tree.tiger.HookTypeName; |
|
10 |
| import koala.dynamicjava.tree.tiger.TypeParameter; |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
| |
|
23 |
| |
|
24 |
| public class DepthFirstVisitor implements Visitor<Void>, Runnable1<Node> { |
|
25 |
| |
|
26 |
0
| public void run(Node n) {
|
|
27 |
0
| n.acceptVisitor(this);
|
|
28 |
| } |
|
29 |
| |
|
30 |
0
| protected void recur(Node n) {
|
|
31 |
0
| if (n != null) { run(n); }
|
|
32 |
| } |
|
33 |
| |
|
34 |
0
| protected void recur(Node... ns) {
|
|
35 |
0
| if (ns != null) {
|
|
36 |
0
| for (Node n : ns) {
|
|
37 |
0
| if (n != null) { run(n); }
|
|
38 |
| } |
|
39 |
| } |
|
40 |
| } |
|
41 |
| |
|
42 |
0
| protected void recur(Iterable<? extends Node> l) {
|
|
43 |
0
| if (l != null) {
|
|
44 |
0
| for (Node n : l) {
|
|
45 |
0
| if (n != null) { run(n); }
|
|
46 |
| } |
|
47 |
| } |
|
48 |
| } |
|
49 |
| |
|
50 |
0
| protected void recur(Option<? extends Node> opt) {
|
|
51 |
0
| if (opt != null && opt.isSome()) {
|
|
52 |
0
| Node n = opt.unwrap();
|
|
53 |
0
| if (n != null) { run(n); }
|
|
54 |
| } |
|
55 |
| } |
|
56 |
| |
|
57 |
0
| protected void recurOnLists(Iterable<? extends Iterable<? extends Node>> l) {
|
|
58 |
0
| if (l != null) {
|
|
59 |
0
| for (Iterable<? extends Node> nl : l) {
|
|
60 |
0
| if (nl != null) {
|
|
61 |
0
| for (Node n :nl) {
|
|
62 |
0
| if (n != null) { run(n); }
|
|
63 |
| } |
|
64 |
| } |
|
65 |
| } |
|
66 |
| } |
|
67 |
| } |
|
68 |
| |
|
69 |
0
| protected void recurOnList(Option<? extends Iterable<? extends Node>> opt) {
|
|
70 |
0
| if (opt != null && opt.isSome()) {
|
|
71 |
0
| Iterable<? extends Node> l = opt.unwrap();
|
|
72 |
0
| if (l != null) {
|
|
73 |
0
| for (Node n : l) {
|
|
74 |
0
| if (n != null) { run(n); }
|
|
75 |
| } |
|
76 |
| } |
|
77 |
| } |
|
78 |
| } |
|
79 |
| |
|
80 |
0
| protected void recurOnPairSeconds(Iterable<? extends Pair<?, ? extends Node>> l) {
|
|
81 |
0
| if (l != null) {
|
|
82 |
0
| for (Pair<?, ? extends Node> p : l) {
|
|
83 |
0
| if (p != null) {
|
|
84 |
0
| Node n = p.second();
|
|
85 |
0
| if (n != null) { run(n); }
|
|
86 |
| } |
|
87 |
| } |
|
88 |
| } |
|
89 |
| } |
|
90 |
| |
|
91 |
0
| public Void visit(CompilationUnit node) {
|
|
92 |
0
| recur(node.getPackage());
|
|
93 |
0
| recur(node.getImports());
|
|
94 |
0
| recur(node.getDeclarations());
|
|
95 |
0
| return null;
|
|
96 |
| } |
|
97 |
| |
|
98 |
0
| public Void visit(PackageDeclaration node) {
|
|
99 |
0
| recur(node.getModifiers());
|
|
100 |
0
| return null;
|
|
101 |
| } |
|
102 |
| |
|
103 |
0
| public Void visit(ImportDeclaration node) {
|
|
104 |
0
| return null;
|
|
105 |
| } |
|
106 |
| |
|
107 |
0
| public Void visit(EmptyStatement node) {
|
|
108 |
0
| return null;
|
|
109 |
| } |
|
110 |
| |
|
111 |
0
| public Void visit(ExpressionStatement node) {
|
|
112 |
0
| recur(node.getExpression());
|
|
113 |
0
| return null;
|
|
114 |
| } |
|
115 |
| |
|
116 |
0
| public Void visit(WhileStatement node) {
|
|
117 |
0
| recur(node.getCondition());
|
|
118 |
0
| recur(node.getBody());
|
|
119 |
0
| return null;
|
|
120 |
| } |
|
121 |
| |
|
122 |
0
| public Void visit(ForStatement node) {
|
|
123 |
0
| recur(node.getInitialization());
|
|
124 |
0
| recur(node.getCondition());
|
|
125 |
0
| recur(node.getUpdate());
|
|
126 |
0
| recur(node.getBody());
|
|
127 |
0
| return null;
|
|
128 |
| } |
|
129 |
| |
|
130 |
0
| public Void visit(ForEachStatement node) {
|
|
131 |
0
| recur(node.getParameter());
|
|
132 |
0
| recur(node.getCollection());
|
|
133 |
0
| recur(node.getBody());
|
|
134 |
0
| return null;
|
|
135 |
| } |
|
136 |
| |
|
137 |
0
| public Void visit(DoStatement node) {
|
|
138 |
0
| recur(node.getBody());
|
|
139 |
0
| recur(node.getCondition());
|
|
140 |
0
| return null;
|
|
141 |
| } |
|
142 |
| |
|
143 |
0
| public Void visit(SwitchStatement node) {
|
|
144 |
0
| recur(node.getSelector());
|
|
145 |
0
| recur(node.getBindings());
|
|
146 |
0
| return null;
|
|
147 |
| } |
|
148 |
| |
|
149 |
0
| public Void visit(SwitchBlock node) {
|
|
150 |
0
| recur(node.getExpression());
|
|
151 |
0
| recur(node.getStatements());
|
|
152 |
0
| return null;
|
|
153 |
| } |
|
154 |
| |
|
155 |
0
| public Void visit(LabeledStatement node) {
|
|
156 |
0
| recur(node.getStatement());
|
|
157 |
0
| return null;
|
|
158 |
| } |
|
159 |
| |
|
160 |
0
| public Void visit(BreakStatement node) {
|
|
161 |
0
| return null;
|
|
162 |
| } |
|
163 |
| |
|
164 |
0
| public Void visit(TryStatement node) {
|
|
165 |
0
| recur(node.getTryBlock());
|
|
166 |
0
| recur(node.getCatchStatements());
|
|
167 |
0
| recur(node.getFinallyBlock());
|
|
168 |
0
| return null;
|
|
169 |
| } |
|
170 |
| |
|
171 |
0
| public Void visit(CatchStatement node) {
|
|
172 |
0
| recur(node.getException());
|
|
173 |
0
| recur(node.getBlock());
|
|
174 |
0
| return null;
|
|
175 |
| } |
|
176 |
| |
|
177 |
0
| public Void visit(ThrowStatement node) {
|
|
178 |
0
| recur(node.getExpression());
|
|
179 |
0
| return null;
|
|
180 |
| } |
|
181 |
| |
|
182 |
0
| public Void visit(ReturnStatement node) {
|
|
183 |
0
| recur(node.getExpression());
|
|
184 |
0
| return null;
|
|
185 |
| } |
|
186 |
| |
|
187 |
0
| public Void visit(SynchronizedStatement node) {
|
|
188 |
0
| recur(node.getLock());
|
|
189 |
0
| recur(node.getBody());
|
|
190 |
0
| return null;
|
|
191 |
| } |
|
192 |
| |
|
193 |
0
| public Void visit(ContinueStatement node) {
|
|
194 |
0
| return null;
|
|
195 |
| } |
|
196 |
| |
|
197 |
0
| public Void visit(IfThenStatement node) {
|
|
198 |
0
| recur(node.getCondition());
|
|
199 |
0
| recur(node.getThenStatement());
|
|
200 |
0
| return null;
|
|
201 |
| } |
|
202 |
| |
|
203 |
0
| public Void visit(IfThenElseStatement node) {
|
|
204 |
0
| recur(node.getCondition());
|
|
205 |
0
| recur(node.getThenStatement());
|
|
206 |
0
| recur(node.getElseStatement());
|
|
207 |
0
| return null;
|
|
208 |
| } |
|
209 |
| |
|
210 |
0
| public Void visit(AssertStatement node) {
|
|
211 |
0
| recur(node.getCondition());
|
|
212 |
0
| recur(node.getFailString());
|
|
213 |
0
| return null;
|
|
214 |
| } |
|
215 |
| |
|
216 |
0
| public Void visit(Literal node) {
|
|
217 |
0
| return null;
|
|
218 |
| } |
|
219 |
| |
|
220 |
0
| public Void visit(ThisExpression node) {
|
|
221 |
0
| return null;
|
|
222 |
| } |
|
223 |
| |
|
224 |
0
| public Void visit(AmbiguousName node) {
|
|
225 |
0
| return null;
|
|
226 |
| } |
|
227 |
| |
|
228 |
0
| public Void visit(VariableAccess node) {
|
|
229 |
0
| return null;
|
|
230 |
| } |
|
231 |
| |
|
232 |
0
| public Void visit(SimpleFieldAccess node) {
|
|
233 |
0
| return null;
|
|
234 |
| } |
|
235 |
| |
|
236 |
0
| public Void visit(ObjectFieldAccess node) {
|
|
237 |
0
| recur(node.getExpression());
|
|
238 |
0
| return null;
|
|
239 |
| } |
|
240 |
| |
|
241 |
0
| public Void visit(StaticFieldAccess node) {
|
|
242 |
0
| recur(node.getFieldType());
|
|
243 |
0
| return null;
|
|
244 |
| } |
|
245 |
| |
|
246 |
0
| public Void visit(SuperFieldAccess node) {
|
|
247 |
0
| return null;
|
|
248 |
| } |
|
249 |
| |
|
250 |
0
| public Void visit(ArrayAccess node) {
|
|
251 |
0
| recur(node.getExpression());
|
|
252 |
0
| recur(node.getCellNumber());
|
|
253 |
0
| return null;
|
|
254 |
| } |
|
255 |
| |
|
256 |
0
| public Void visit(ObjectMethodCall node) {
|
|
257 |
0
| recur(node.getExpression());
|
|
258 |
0
| recurOnList(node.getTypeArgs());
|
|
259 |
0
| recur(node.getArguments());
|
|
260 |
0
| return null;
|
|
261 |
| } |
|
262 |
| |
|
263 |
0
| public Void visit(SimpleMethodCall node) {
|
|
264 |
0
| recur(node.getArguments());
|
|
265 |
0
| return null;
|
|
266 |
| } |
|
267 |
| |
|
268 |
0
| public Void visit(StaticMethodCall node) {
|
|
269 |
0
| recur(node.getMethodType());
|
|
270 |
0
| recurOnList(node.getTypeArgs());
|
|
271 |
0
| recur(node.getArguments());
|
|
272 |
0
| return null;
|
|
273 |
| } |
|
274 |
| |
|
275 |
0
| public Void visit(ConstructorCall node) {
|
|
276 |
0
| recur(node.getExpression());
|
|
277 |
0
| recur(node.getArguments());
|
|
278 |
0
| return null;
|
|
279 |
| } |
|
280 |
| |
|
281 |
0
| public Void visit(SuperMethodCall node) {
|
|
282 |
0
| recurOnList(node.getTypeArgs());
|
|
283 |
0
| recur(node.getArguments());
|
|
284 |
0
| return null;
|
|
285 |
| } |
|
286 |
| |
|
287 |
0
| public Void visit(BooleanTypeName node) {
|
|
288 |
0
| return null;
|
|
289 |
| } |
|
290 |
| |
|
291 |
0
| public Void visit(ByteTypeName node) {
|
|
292 |
0
| return null;
|
|
293 |
| } |
|
294 |
| |
|
295 |
0
| public Void visit(ShortTypeName node) {
|
|
296 |
0
| return null;
|
|
297 |
| } |
|
298 |
| |
|
299 |
0
| public Void visit(CharTypeName node) {
|
|
300 |
0
| return null;
|
|
301 |
| } |
|
302 |
| |
|
303 |
0
| public Void visit(IntTypeName node) {
|
|
304 |
0
| return null;
|
|
305 |
| } |
|
306 |
| |
|
307 |
0
| public Void visit(LongTypeName node) {
|
|
308 |
0
| return null;
|
|
309 |
| } |
|
310 |
| |
|
311 |
0
| public Void visit(FloatTypeName node) {
|
|
312 |
0
| return null;
|
|
313 |
| } |
|
314 |
| |
|
315 |
0
| public Void visit(DoubleTypeName node) {
|
|
316 |
0
| return null;
|
|
317 |
| } |
|
318 |
| |
|
319 |
0
| public Void visit(VoidTypeName node) {
|
|
320 |
0
| return null;
|
|
321 |
| } |
|
322 |
| |
|
323 |
0
| public Void visit(ReferenceTypeName node) {
|
|
324 |
0
| if (node instanceof TypeParameter) {
|
|
325 |
0
| recur(((TypeParameter) node).getBound());
|
|
326 |
0
| recur(((TypeParameter) node).getInterfaceBounds());
|
|
327 |
| } |
|
328 |
0
| return null;
|
|
329 |
| } |
|
330 |
| |
|
331 |
0
| public Void visit(GenericReferenceTypeName node) {
|
|
332 |
0
| recurOnLists(node.getTypeArguments());
|
|
333 |
0
| return null;
|
|
334 |
| } |
|
335 |
| |
|
336 |
0
| public Void visit(ArrayTypeName node) {
|
|
337 |
0
| recur(node.getElementType());
|
|
338 |
0
| return null;
|
|
339 |
| } |
|
340 |
| |
|
341 |
0
| public Void visit(HookTypeName node) {
|
|
342 |
0
| recur(node.getUpperBound());
|
|
343 |
0
| recur(node.getLowerBound());
|
|
344 |
0
| return null;
|
|
345 |
| } |
|
346 |
| |
|
347 |
0
| public Void visit(TypeExpression node) {
|
|
348 |
0
| recur(node.getType());
|
|
349 |
0
| return null;
|
|
350 |
| } |
|
351 |
| |
|
352 |
0
| public Void visit(PostIncrement node) {
|
|
353 |
0
| recur(node.getExpression());
|
|
354 |
0
| return null;
|
|
355 |
| } |
|
356 |
| |
|
357 |
0
| public Void visit(PostDecrement node) {
|
|
358 |
0
| recur(node.getExpression());
|
|
359 |
0
| return null;
|
|
360 |
| } |
|
361 |
| |
|
362 |
0
| public Void visit(PreIncrement node) {
|
|
363 |
0
| recur(node.getExpression());
|
|
364 |
0
| return null;
|
|
365 |
| } |
|
366 |
| |
|
367 |
0
| public Void visit(PreDecrement node) {
|
|
368 |
0
| recur(node.getExpression());
|
|
369 |
0
| return null;
|
|
370 |
| } |
|
371 |
| |
|
372 |
0
| public Void visit(ArrayInitializer node) {
|
|
373 |
0
| recur(node.getElementType());
|
|
374 |
0
| recur(node.getCells());
|
|
375 |
0
| return null;
|
|
376 |
| } |
|
377 |
| |
|
378 |
0
| public Void visit(ArrayAllocation node) {
|
|
379 |
0
| recur(node.getElementType());
|
|
380 |
0
| recur(node.getSizes());
|
|
381 |
0
| recur(node.getInitialization());
|
|
382 |
0
| return null;
|
|
383 |
| } |
|
384 |
| |
|
385 |
0
| public Void visit(SimpleAllocation node) {
|
|
386 |
0
| recurOnList(node.getTypeArgs());
|
|
387 |
0
| recur(node.getCreationType());
|
|
388 |
0
| recur(node.getArguments());
|
|
389 |
0
| return null;
|
|
390 |
| } |
|
391 |
| |
|
392 |
0
| public Void visit(AnonymousAllocation node) {
|
|
393 |
0
| recurOnList(node.getTypeArgs());
|
|
394 |
0
| recur(node.getCreationType());
|
|
395 |
0
| recur(node.getArguments());
|
|
396 |
0
| recur(node.getMembers());
|
|
397 |
0
| return null;
|
|
398 |
| } |
|
399 |
| |
|
400 |
0
| public Void visit(InnerAllocation node) {
|
|
401 |
0
| recur(node.getExpression());
|
|
402 |
0
| recurOnList(node.getTypeArgs());
|
|
403 |
0
| recurOnList(node.getClassTypeArgs());
|
|
404 |
0
| recur(node.getArguments());
|
|
405 |
0
| return null;
|
|
406 |
| } |
|
407 |
| |
|
408 |
0
| public Void visit(AnonymousInnerAllocation node) {
|
|
409 |
0
| recur(node.getExpression());
|
|
410 |
0
| recurOnList(node.getTypeArgs());
|
|
411 |
0
| recurOnList(node.getClassTypeArgs());
|
|
412 |
0
| recur(node.getArguments());
|
|
413 |
0
| recur(node.getMembers());
|
|
414 |
0
| return null;
|
|
415 |
| } |
|
416 |
| |
|
417 |
0
| public Void visit(CastExpression node) {
|
|
418 |
0
| recur(node.getTargetType());
|
|
419 |
0
| recur(node.getExpression());
|
|
420 |
0
| return null;
|
|
421 |
| } |
|
422 |
| |
|
423 |
0
| public Void visit(NotExpression node) {
|
|
424 |
0
| recur(node.getExpression());
|
|
425 |
0
| return null;
|
|
426 |
| } |
|
427 |
| |
|
428 |
0
| public Void visit(ComplementExpression node) {
|
|
429 |
0
| recur(node.getExpression());
|
|
430 |
0
| return null;
|
|
431 |
| } |
|
432 |
| |
|
433 |
0
| public Void visit(PlusExpression node) {
|
|
434 |
0
| recur(node.getExpression());
|
|
435 |
0
| return null;
|
|
436 |
| } |
|
437 |
| |
|
438 |
0
| public Void visit(MinusExpression node) {
|
|
439 |
0
| recur(node.getExpression());
|
|
440 |
0
| return null;
|
|
441 |
| } |
|
442 |
| |
|
443 |
0
| public Void visit(MultiplyExpression node) {
|
|
444 |
0
| recur(node.getLeftExpression());
|
|
445 |
0
| recur(node.getRightExpression());
|
|
446 |
0
| return null;
|
|
447 |
| } |
|
448 |
| |
|
449 |
0
| public Void visit(DivideExpression node) {
|
|
450 |
0
| recur(node.getLeftExpression());
|
|
451 |
0
| recur(node.getRightExpression());
|
|
452 |
0
| return null;
|
|
453 |
| } |
|
454 |
| |
|
455 |
0
| public Void visit(RemainderExpression node) {
|
|
456 |
0
| recur(node.getLeftExpression());
|
|
457 |
0
| recur(node.getRightExpression());
|
|
458 |
0
| return null;
|
|
459 |
| } |
|
460 |
| |
|
461 |
0
| public Void visit(AddExpression node) {
|
|
462 |
0
| recur(node.getLeftExpression());
|
|
463 |
0
| recur(node.getRightExpression());
|
|
464 |
0
| return null;
|
|
465 |
| } |
|
466 |
| |
|
467 |
0
| public Void visit(SubtractExpression node) {
|
|
468 |
0
| recur(node.getLeftExpression());
|
|
469 |
0
| recur(node.getRightExpression());
|
|
470 |
0
| return null;
|
|
471 |
| } |
|
472 |
| |
|
473 |
0
| public Void visit(ShiftLeftExpression node) {
|
|
474 |
0
| recur(node.getLeftExpression());
|
|
475 |
0
| recur(node.getRightExpression());
|
|
476 |
0
| return null;
|
|
477 |
| } |
|
478 |
| |
|
479 |
0
| public Void visit(ShiftRightExpression node) {
|
|
480 |
0
| recur(node.getLeftExpression());
|
|
481 |
0
| recur(node.getRightExpression());
|
|
482 |
0
| return null;
|
|
483 |
| } |
|
484 |
| |
|
485 |
0
| public Void visit(UnsignedShiftRightExpression node) {
|
|
486 |
0
| recur(node.getLeftExpression());
|
|
487 |
0
| recur(node.getRightExpression());
|
|
488 |
0
| return null;
|
|
489 |
| } |
|
490 |
| |
|
491 |
0
| public Void visit(LessExpression node) {
|
|
492 |
0
| recur(node.getLeftExpression());
|
|
493 |
0
| recur(node.getRightExpression());
|
|
494 |
0
| return null;
|
|
495 |
| } |
|
496 |
| |
|
497 |
0
| public Void visit(GreaterExpression node) {
|
|
498 |
0
| recur(node.getLeftExpression());
|
|
499 |
0
| recur(node.getRightExpression());
|
|
500 |
0
| return null;
|
|
501 |
| } |
|
502 |
| |
|
503 |
0
| public Void visit(LessOrEqualExpression node) {
|
|
504 |
0
| recur(node.getLeftExpression());
|
|
505 |
0
| recur(node.getRightExpression());
|
|
506 |
0
| return null;
|
|
507 |
| } |
|
508 |
| |
|
509 |
0
| public Void visit(GreaterOrEqualExpression node) {
|
|
510 |
0
| recur(node.getLeftExpression());
|
|
511 |
0
| recur(node.getRightExpression());
|
|
512 |
0
| return null;
|
|
513 |
| } |
|
514 |
| |
|
515 |
0
| public Void visit(InstanceOfExpression node) {
|
|
516 |
0
| recur(node.getExpression());
|
|
517 |
0
| recur(node.getReferenceType());
|
|
518 |
0
| return null;
|
|
519 |
| } |
|
520 |
| |
|
521 |
0
| public Void visit(EqualExpression node) {
|
|
522 |
0
| recur(node.getLeftExpression());
|
|
523 |
0
| recur(node.getRightExpression());
|
|
524 |
0
| return null;
|
|
525 |
| } |
|
526 |
| |
|
527 |
0
| public Void visit(NotEqualExpression node) {
|
|
528 |
0
| recur(node.getLeftExpression());
|
|
529 |
0
| recur(node.getRightExpression());
|
|
530 |
0
| return null;
|
|
531 |
| } |
|
532 |
| |
|
533 |
0
| public Void visit(BitAndExpression node) {
|
|
534 |
0
| recur(node.getLeftExpression());
|
|
535 |
0
| recur(node.getRightExpression());
|
|
536 |
0
| return null;
|
|
537 |
| } |
|
538 |
| |
|
539 |
0
| public Void visit(ExclusiveOrExpression node) {
|
|
540 |
0
| recur(node.getLeftExpression());
|
|
541 |
0
| recur(node.getRightExpression());
|
|
542 |
0
| return null;
|
|
543 |
| } |
|
544 |
| |
|
545 |
0
| public Void visit(BitOrExpression node) {
|
|
546 |
0
| recur(node.getLeftExpression());
|
|
547 |
0
| recur(node.getRightExpression());
|
|
548 |
0
| return null;
|
|
549 |
| } |
|
550 |
| |
|
551 |
0
| public Void visit(AndExpression node) {
|
|
552 |
0
| recur(node.getLeftExpression());
|
|
553 |
0
| recur(node.getRightExpression());
|
|
554 |
0
| return null;
|
|
555 |
| } |
|
556 |
| |
|
557 |
0
| public Void visit(OrExpression node) {
|
|
558 |
0
| recur(node.getLeftExpression());
|
|
559 |
0
| recur(node.getRightExpression());
|
|
560 |
0
| return null;
|
|
561 |
| } |
|
562 |
| |
|
563 |
0
| public Void visit(ConditionalExpression node) {
|
|
564 |
0
| recur(node.getConditionExpression());
|
|
565 |
0
| recur(node.getIfTrueExpression());
|
|
566 |
0
| recur(node.getIfFalseExpression());
|
|
567 |
0
| return null;
|
|
568 |
| } |
|
569 |
| |
|
570 |
0
| public Void visit(SimpleAssignExpression node) {
|
|
571 |
0
| recur(node.getLeftExpression());
|
|
572 |
0
| recur(node.getRightExpression());
|
|
573 |
0
| return null;
|
|
574 |
| } |
|
575 |
| |
|
576 |
0
| public Void visit(MultiplyAssignExpression node) {
|
|
577 |
0
| recur(node.getLeftExpression());
|
|
578 |
0
| recur(node.getRightExpression());
|
|
579 |
0
| return null;
|
|
580 |
| } |
|
581 |
| |
|
582 |
0
| public Void visit(DivideAssignExpression node) {
|
|
583 |
0
| recur(node.getLeftExpression());
|
|
584 |
0
| recur(node.getRightExpression());
|
|
585 |
0
| return null;
|
|
586 |
| } |
|
587 |
| |
|
588 |
0
| public Void visit(RemainderAssignExpression node) {
|
|
589 |
0
| recur(node.getLeftExpression());
|
|
590 |
0
| recur(node.getRightExpression());
|
|
591 |
0
| return null;
|
|
592 |
| } |
|
593 |
| |
|
594 |
0
| public Void visit(AddAssignExpression node) {
|
|
595 |
0
| recur(node.getLeftExpression());
|
|
596 |
0
| recur(node.getRightExpression());
|
|
597 |
0
| return null;
|
|
598 |
| } |
|
599 |
| |
|
600 |
0
| public Void visit(SubtractAssignExpression node) {
|
|
601 |
0
| recur(node.getLeftExpression());
|
|
602 |
0
| recur(node.getRightExpression());
|
|
603 |
0
| return null;
|
|
604 |
| } |
|
605 |
| |
|
606 |
0
| public Void visit(ShiftLeftAssignExpression node) {
|
|
607 |
0
| recur(node.getLeftExpression());
|
|
608 |
0
| recur(node.getRightExpression());
|
|
609 |
0
| return null;
|
|
610 |
| } |
|
611 |
| |
|
612 |
0
| public Void visit(ShiftRightAssignExpression node) {
|
|
613 |
0
| recur(node.getLeftExpression());
|
|
614 |
0
| recur(node.getRightExpression());
|
|
615 |
0
| return null;
|
|
616 |
| } |
|
617 |
| |
|
618 |
0
| public Void visit(UnsignedShiftRightAssignExpression node) {
|
|
619 |
0
| recur(node.getLeftExpression());
|
|
620 |
0
| recur(node.getRightExpression());
|
|
621 |
0
| return null;
|
|
622 |
| } |
|
623 |
| |
|
624 |
0
| public Void visit(BitAndAssignExpression node) {
|
|
625 |
0
| recur(node.getLeftExpression());
|
|
626 |
0
| recur(node.getRightExpression());
|
|
627 |
0
| return null;
|
|
628 |
| } |
|
629 |
| |
|
630 |
0
| public Void visit(ExclusiveOrAssignExpression node) {
|
|
631 |
0
| recur(node.getLeftExpression());
|
|
632 |
0
| recur(node.getRightExpression());
|
|
633 |
0
| return null;
|
|
634 |
| } |
|
635 |
| |
|
636 |
0
| public Void visit(BitOrAssignExpression node) {
|
|
637 |
0
| recur(node.getLeftExpression());
|
|
638 |
0
| recur(node.getRightExpression());
|
|
639 |
0
| return null;
|
|
640 |
| } |
|
641 |
| |
|
642 |
0
| public Void visit(BlockStatement node) {
|
|
643 |
0
| recur(node.getStatements());
|
|
644 |
0
| return null;
|
|
645 |
| } |
|
646 |
| |
|
647 |
0
| public Void visit(ClassDeclaration node) {
|
|
648 |
0
| recur(node.getModifiers());
|
|
649 |
0
| recurOnList(node.getTypeParams());
|
|
650 |
0
| recur(node.getSuperclass());
|
|
651 |
0
| recur(node.getInterfaces());
|
|
652 |
0
| recur(node.getMembers());
|
|
653 |
0
| return null;
|
|
654 |
| } |
|
655 |
| |
|
656 |
0
| public Void visit(InterfaceDeclaration node) {
|
|
657 |
0
| recur(node.getModifiers());
|
|
658 |
0
| recurOnList(node.getTypeParams());
|
|
659 |
0
| recur(node.getInterfaces());
|
|
660 |
0
| recur(node.getMembers());
|
|
661 |
0
| return null;
|
|
662 |
| } |
|
663 |
| |
|
664 |
0
| public Void visit(ConstructorDeclaration node) {
|
|
665 |
0
| recur(node.getModifiers());
|
|
666 |
0
| recurOnList(node.getTypeParams());
|
|
667 |
0
| recur(node.getParameters());
|
|
668 |
0
| recur(node.getExceptions());
|
|
669 |
0
| recur(node.getConstructorCall());
|
|
670 |
0
| recur(node.getStatements());
|
|
671 |
0
| return null;
|
|
672 |
| } |
|
673 |
| |
|
674 |
0
| public Void visit(MethodDeclaration node) {
|
|
675 |
0
| recur(node.getModifiers());
|
|
676 |
0
| recurOnList(node.getTypeParams());
|
|
677 |
0
| recur(node.getReturnType());
|
|
678 |
0
| recur(node.getParameters());
|
|
679 |
0
| recur(node.getExceptions());
|
|
680 |
0
| recur(node.getBody());
|
|
681 |
0
| return null;
|
|
682 |
| } |
|
683 |
| |
|
684 |
0
| public Void visit(FormalParameter node) {
|
|
685 |
0
| recur(node.getType());
|
|
686 |
0
| return null;
|
|
687 |
| } |
|
688 |
| |
|
689 |
0
| public Void visit(FieldDeclaration node) {
|
|
690 |
0
| recur(node.getModifiers());
|
|
691 |
0
| recur(node.getType());
|
|
692 |
0
| recur(node.getInitializer());
|
|
693 |
0
| return null;
|
|
694 |
| } |
|
695 |
| |
|
696 |
0
| public Void visit(VariableDeclaration node) {
|
|
697 |
0
| recur(node.getModifiers());
|
|
698 |
0
| recur(node.getType());
|
|
699 |
0
| recur(node.getInitializer());
|
|
700 |
0
| return null;
|
|
701 |
| } |
|
702 |
| |
|
703 |
0
| public Void visit(EnumConstant node) {
|
|
704 |
0
| recur(node.getModifiers());
|
|
705 |
0
| recur(node.getArguments());
|
|
706 |
0
| recur(node.getClassBody());
|
|
707 |
0
| return null;
|
|
708 |
| } |
|
709 |
| |
|
710 |
0
| public Void visit(ClassInitializer node) {
|
|
711 |
0
| recur(node.getBlock());
|
|
712 |
0
| return null;
|
|
713 |
| } |
|
714 |
| |
|
715 |
0
| public Void visit(InstanceInitializer node) {
|
|
716 |
0
| recur(node.getBlock());
|
|
717 |
0
| return null;
|
|
718 |
| } |
|
719 |
| |
|
720 |
0
| public Void visit(ModifierSet node) {
|
|
721 |
0
| recur(node.getAnnotations());
|
|
722 |
0
| return null;
|
|
723 |
| } |
|
724 |
| |
|
725 |
0
| public Void visit(Annotation node) {
|
|
726 |
0
| recur(node.getType());
|
|
727 |
0
| recurOnPairSeconds(node.getValues());
|
|
728 |
0
| return null;
|
|
729 |
| } |
|
730 |
| |
|
731 |
| } |