28 import com.sun.source.tree.*; |
28 import com.sun.source.tree.*; |
29 |
29 |
30 /** |
30 /** |
31 * A simple visitor for tree nodes. |
31 * A simple visitor for tree nodes. |
32 * |
32 * |
|
33 * @param <R> the return type of this visitor's methods. Use {@link |
|
34 * Void} for visitors that do not need to return results. |
|
35 * @param <P> the type of the additional parameter to this visitor's |
|
36 * methods. Use {@code Void} for visitors that do not need an |
|
37 * additional parameter. |
|
38 * |
33 * @author Peter von der Ahé |
39 * @author Peter von der Ahé |
34 * @since 1.6 |
40 * @since 1.6 |
35 */ |
41 */ |
36 @jdk.Exported |
42 @jdk.Exported |
37 public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> { |
43 public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> { |
|
44 /** |
|
45 * The default value, returned by the {@link #defaultAction default action}. |
|
46 */ |
38 protected final R DEFAULT_VALUE; |
47 protected final R DEFAULT_VALUE; |
39 |
48 |
|
49 /** |
|
50 * Creates a visitor, with a DEFAULT_VALUE of {@code null}. |
|
51 */ |
40 protected SimpleTreeVisitor() { |
52 protected SimpleTreeVisitor() { |
41 DEFAULT_VALUE = null; |
53 DEFAULT_VALUE = null; |
42 } |
54 } |
43 |
55 |
|
56 /** |
|
57 * Creates a visitor, with a specified DEFAULT_VALUE. |
|
58 * @param defaultValue the default value to be returned by the default action. |
|
59 */ |
44 protected SimpleTreeVisitor(R defaultValue) { |
60 protected SimpleTreeVisitor(R defaultValue) { |
45 DEFAULT_VALUE = defaultValue; |
61 DEFAULT_VALUE = defaultValue; |
46 } |
62 } |
47 |
63 |
|
64 /** |
|
65 * The default action, used by all visit methods that are not overridden. |
|
66 * @param node the node being visited |
|
67 * @param p the parameter value passed to the visit method |
|
68 * @return the result value to be returned from the visit method |
|
69 */ |
48 protected R defaultAction(Tree node, P p) { |
70 protected R defaultAction(Tree node, P p) { |
49 return DEFAULT_VALUE; |
71 return DEFAULT_VALUE; |
50 } |
72 } |
51 |
73 |
|
74 /** |
|
75 * Invokes the appropriate visit method specific to the type of the node. |
|
76 * @param node the node on which to dispatch |
|
77 * @param p a parameter to be passed to the appropriate visit method |
|
78 * @return the value returns from the appropriate visit method |
|
79 */ |
52 public final R visit(Tree node, P p) { |
80 public final R visit(Tree node, P p) { |
53 return (node == null) ? null : node.accept(this, p); |
81 return (node == null) ? null : node.accept(this, p); |
54 } |
82 } |
55 |
83 |
|
84 /** |
|
85 * Invokes the appropriate visit method on each of a sequence of nodes. |
|
86 * @param nodes the nodes on which to dispatch |
|
87 * @param p a parameter value to be passed to each appropriate visit method |
|
88 * @return the value return from the last of the visit methods, or null |
|
89 * if none were called. |
|
90 */ |
56 public final R visit(Iterable<? extends Tree> nodes, P p) { |
91 public final R visit(Iterable<? extends Tree> nodes, P p) { |
57 R r = null; |
92 R r = null; |
58 if (nodes != null) |
93 if (nodes != null) |
59 for (Tree node : nodes) |
94 for (Tree node : nodes) |
60 r = visit(node, p); |
95 r = visit(node, p); |
61 return r; |
96 return r; |
62 } |
97 } |
63 |
98 |
|
99 /** |
|
100 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
101 * |
|
102 * @param node {@inheritDoc} |
|
103 * @param p {@inheritDoc} |
|
104 * @return the result of {@code defaultAction} |
|
105 */ |
|
106 @Override |
64 public R visitCompilationUnit(CompilationUnitTree node, P p) { |
107 public R visitCompilationUnit(CompilationUnitTree node, P p) { |
65 return defaultAction(node, p); |
108 return defaultAction(node, p); |
66 } |
109 } |
67 |
110 |
|
111 /** |
|
112 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
113 * |
|
114 * @param node {@inheritDoc} |
|
115 * @param p {@inheritDoc} |
|
116 * @return the result of {@code defaultAction} |
|
117 */ |
|
118 @Override |
68 public R visitPackage(PackageTree node, P p) { |
119 public R visitPackage(PackageTree node, P p) { |
69 return defaultAction(node, p); |
120 return defaultAction(node, p); |
70 } |
121 } |
71 |
122 |
|
123 /** |
|
124 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
125 * |
|
126 * @param node {@inheritDoc} |
|
127 * @param p {@inheritDoc} |
|
128 * @return the result of {@code defaultAction} |
|
129 */ |
|
130 @Override |
72 public R visitImport(ImportTree node, P p) { |
131 public R visitImport(ImportTree node, P p) { |
73 return defaultAction(node, p); |
132 return defaultAction(node, p); |
74 } |
133 } |
75 |
134 |
|
135 /** |
|
136 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
137 * |
|
138 * @param node {@inheritDoc} |
|
139 * @param p {@inheritDoc} |
|
140 * @return the result of {@code defaultAction} |
|
141 */ |
|
142 @Override |
76 public R visitClass(ClassTree node, P p) { |
143 public R visitClass(ClassTree node, P p) { |
77 return defaultAction(node, p); |
144 return defaultAction(node, p); |
78 } |
145 } |
79 |
146 |
|
147 /** |
|
148 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
149 * |
|
150 * @param node {@inheritDoc} |
|
151 * @param p {@inheritDoc} |
|
152 * @return the result of {@code defaultAction} |
|
153 */ |
|
154 @Override |
80 public R visitMethod(MethodTree node, P p) { |
155 public R visitMethod(MethodTree node, P p) { |
81 return defaultAction(node, p); |
156 return defaultAction(node, p); |
82 } |
157 } |
83 |
158 |
|
159 /** |
|
160 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
161 * |
|
162 * @param node {@inheritDoc} |
|
163 * @param p {@inheritDoc} |
|
164 * @return the result of {@code defaultAction} |
|
165 */ |
|
166 @Override |
84 public R visitVariable(VariableTree node, P p) { |
167 public R visitVariable(VariableTree node, P p) { |
85 return defaultAction(node, p); |
168 return defaultAction(node, p); |
86 } |
169 } |
87 |
170 |
|
171 /** |
|
172 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
173 * |
|
174 * @param node {@inheritDoc} |
|
175 * @param p {@inheritDoc} |
|
176 * @return the result of {@code defaultAction} |
|
177 */ |
|
178 @Override |
88 public R visitEmptyStatement(EmptyStatementTree node, P p) { |
179 public R visitEmptyStatement(EmptyStatementTree node, P p) { |
89 return defaultAction(node, p); |
180 return defaultAction(node, p); |
90 } |
181 } |
91 |
182 |
|
183 /** |
|
184 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
185 * |
|
186 * @param node {@inheritDoc} |
|
187 * @param p {@inheritDoc} |
|
188 * @return the result of {@code defaultAction} |
|
189 */ |
|
190 @Override |
92 public R visitBlock(BlockTree node, P p) { |
191 public R visitBlock(BlockTree node, P p) { |
93 return defaultAction(node, p); |
192 return defaultAction(node, p); |
94 } |
193 } |
95 |
194 |
|
195 /** |
|
196 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
197 * |
|
198 * @param node {@inheritDoc} |
|
199 * @param p {@inheritDoc} |
|
200 * @return the result of {@code defaultAction} |
|
201 */ |
|
202 @Override |
96 public R visitDoWhileLoop(DoWhileLoopTree node, P p) { |
203 public R visitDoWhileLoop(DoWhileLoopTree node, P p) { |
97 return defaultAction(node, p); |
204 return defaultAction(node, p); |
98 } |
205 } |
99 |
206 |
|
207 /** |
|
208 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
209 * |
|
210 * @param node {@inheritDoc} |
|
211 * @param p {@inheritDoc} |
|
212 * @return the result of {@code defaultAction} |
|
213 */ |
|
214 @Override |
100 public R visitWhileLoop(WhileLoopTree node, P p) { |
215 public R visitWhileLoop(WhileLoopTree node, P p) { |
101 return defaultAction(node, p); |
216 return defaultAction(node, p); |
102 } |
217 } |
103 |
218 |
|
219 /** |
|
220 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
221 * |
|
222 * @param node {@inheritDoc} |
|
223 * @param p {@inheritDoc} |
|
224 * @return the result of {@code defaultAction} |
|
225 */ |
|
226 @Override |
104 public R visitForLoop(ForLoopTree node, P p) { |
227 public R visitForLoop(ForLoopTree node, P p) { |
105 return defaultAction(node, p); |
228 return defaultAction(node, p); |
106 } |
229 } |
107 |
230 |
|
231 /** |
|
232 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
233 * |
|
234 * @param node {@inheritDoc} |
|
235 * @param p {@inheritDoc} |
|
236 * @return the result of {@code defaultAction} |
|
237 */ |
|
238 @Override |
108 public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) { |
239 public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) { |
109 return defaultAction(node, p); |
240 return defaultAction(node, p); |
110 } |
241 } |
111 |
242 |
|
243 /** |
|
244 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
245 * |
|
246 * @param node {@inheritDoc} |
|
247 * @param p {@inheritDoc} |
|
248 * @return the result of {@code defaultAction} |
|
249 */ |
|
250 @Override |
112 public R visitLabeledStatement(LabeledStatementTree node, P p) { |
251 public R visitLabeledStatement(LabeledStatementTree node, P p) { |
113 return defaultAction(node, p); |
252 return defaultAction(node, p); |
114 } |
253 } |
115 |
254 |
|
255 /** |
|
256 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
257 * |
|
258 * @param node {@inheritDoc} |
|
259 * @param p {@inheritDoc} |
|
260 * @return the result of {@code defaultAction} |
|
261 */ |
|
262 @Override |
116 public R visitSwitch(SwitchTree node, P p) { |
263 public R visitSwitch(SwitchTree node, P p) { |
117 return defaultAction(node, p); |
264 return defaultAction(node, p); |
118 } |
265 } |
119 |
266 |
|
267 /** |
|
268 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
269 * |
|
270 * @param node {@inheritDoc} |
|
271 * @param p {@inheritDoc} |
|
272 * @return the result of {@code defaultAction} |
|
273 */ |
|
274 @Override |
120 public R visitCase(CaseTree node, P p) { |
275 public R visitCase(CaseTree node, P p) { |
121 return defaultAction(node, p); |
276 return defaultAction(node, p); |
122 } |
277 } |
123 |
278 |
|
279 /** |
|
280 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
281 * |
|
282 * @param node {@inheritDoc} |
|
283 * @param p {@inheritDoc} |
|
284 * @return the result of {@code defaultAction} |
|
285 */ |
|
286 @Override |
124 public R visitSynchronized(SynchronizedTree node, P p) { |
287 public R visitSynchronized(SynchronizedTree node, P p) { |
125 return defaultAction(node, p); |
288 return defaultAction(node, p); |
126 } |
289 } |
127 |
290 |
|
291 /** |
|
292 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
293 * |
|
294 * @param node {@inheritDoc} |
|
295 * @param p {@inheritDoc} |
|
296 * @return the result of {@code defaultAction} |
|
297 */ |
|
298 @Override |
128 public R visitTry(TryTree node, P p) { |
299 public R visitTry(TryTree node, P p) { |
129 return defaultAction(node, p); |
300 return defaultAction(node, p); |
130 } |
301 } |
131 |
302 |
|
303 /** |
|
304 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
305 * |
|
306 * @param node {@inheritDoc} |
|
307 * @param p {@inheritDoc} |
|
308 * @return the result of {@code defaultAction} |
|
309 */ |
|
310 @Override |
132 public R visitCatch(CatchTree node, P p) { |
311 public R visitCatch(CatchTree node, P p) { |
133 return defaultAction(node, p); |
312 return defaultAction(node, p); |
134 } |
313 } |
135 |
314 |
|
315 /** |
|
316 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
317 * |
|
318 * @param node {@inheritDoc} |
|
319 * @param p {@inheritDoc} |
|
320 * @return the result of {@code defaultAction} |
|
321 */ |
|
322 @Override |
136 public R visitConditionalExpression(ConditionalExpressionTree node, P p) { |
323 public R visitConditionalExpression(ConditionalExpressionTree node, P p) { |
137 return defaultAction(node, p); |
324 return defaultAction(node, p); |
138 } |
325 } |
139 |
326 |
|
327 /** |
|
328 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
329 * |
|
330 * @param node {@inheritDoc} |
|
331 * @param p {@inheritDoc} |
|
332 * @return the result of {@code defaultAction} |
|
333 */ |
|
334 @Override |
140 public R visitIf(IfTree node, P p) { |
335 public R visitIf(IfTree node, P p) { |
141 return defaultAction(node, p); |
336 return defaultAction(node, p); |
142 } |
337 } |
143 |
338 |
|
339 /** |
|
340 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
341 * |
|
342 * @param node {@inheritDoc} |
|
343 * @param p {@inheritDoc} |
|
344 * @return the result of {@code defaultAction} |
|
345 */ |
|
346 @Override |
144 public R visitExpressionStatement(ExpressionStatementTree node, P p) { |
347 public R visitExpressionStatement(ExpressionStatementTree node, P p) { |
145 return defaultAction(node, p); |
348 return defaultAction(node, p); |
146 } |
349 } |
147 |
350 |
|
351 /** |
|
352 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
353 * |
|
354 * @param node {@inheritDoc} |
|
355 * @param p {@inheritDoc} |
|
356 * @return the result of {@code defaultAction} |
|
357 */ |
|
358 @Override |
148 public R visitBreak(BreakTree node, P p) { |
359 public R visitBreak(BreakTree node, P p) { |
149 return defaultAction(node, p); |
360 return defaultAction(node, p); |
150 } |
361 } |
151 |
362 |
|
363 /** |
|
364 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
365 * |
|
366 * @param node {@inheritDoc} |
|
367 * @param p {@inheritDoc} |
|
368 * @return the result of {@code defaultAction} |
|
369 */ |
|
370 @Override |
152 public R visitContinue(ContinueTree node, P p) { |
371 public R visitContinue(ContinueTree node, P p) { |
153 return defaultAction(node, p); |
372 return defaultAction(node, p); |
154 } |
373 } |
155 |
374 |
|
375 /** |
|
376 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
377 * |
|
378 * @param node {@inheritDoc} |
|
379 * @param p {@inheritDoc} |
|
380 * @return the result of {@code defaultAction} |
|
381 */ |
|
382 @Override |
156 public R visitReturn(ReturnTree node, P p) { |
383 public R visitReturn(ReturnTree node, P p) { |
157 return defaultAction(node, p); |
384 return defaultAction(node, p); |
158 } |
385 } |
159 |
386 |
|
387 /** |
|
388 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
389 * |
|
390 * @param node {@inheritDoc} |
|
391 * @param p {@inheritDoc} |
|
392 * @return the result of {@code defaultAction} |
|
393 */ |
|
394 @Override |
160 public R visitThrow(ThrowTree node, P p) { |
395 public R visitThrow(ThrowTree node, P p) { |
161 return defaultAction(node, p); |
396 return defaultAction(node, p); |
162 } |
397 } |
163 |
398 |
|
399 /** |
|
400 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
401 * |
|
402 * @param node {@inheritDoc} |
|
403 * @param p {@inheritDoc} |
|
404 * @return the result of {@code defaultAction} |
|
405 */ |
|
406 @Override |
164 public R visitAssert(AssertTree node, P p) { |
407 public R visitAssert(AssertTree node, P p) { |
165 return defaultAction(node, p); |
408 return defaultAction(node, p); |
166 } |
409 } |
167 |
410 |
|
411 /** |
|
412 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
413 * |
|
414 * @param node {@inheritDoc} |
|
415 * @param p {@inheritDoc} |
|
416 * @return the result of {@code defaultAction} |
|
417 */ |
|
418 @Override |
168 public R visitMethodInvocation(MethodInvocationTree node, P p) { |
419 public R visitMethodInvocation(MethodInvocationTree node, P p) { |
169 return defaultAction(node, p); |
420 return defaultAction(node, p); |
170 } |
421 } |
171 |
422 |
|
423 /** |
|
424 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
425 * |
|
426 * @param node {@inheritDoc} |
|
427 * @param p {@inheritDoc} |
|
428 * @return the result of {@code defaultAction} |
|
429 */ |
|
430 @Override |
172 public R visitNewClass(NewClassTree node, P p) { |
431 public R visitNewClass(NewClassTree node, P p) { |
173 return defaultAction(node, p); |
432 return defaultAction(node, p); |
174 } |
433 } |
175 |
434 |
|
435 /** |
|
436 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
437 * |
|
438 * @param node {@inheritDoc} |
|
439 * @param p {@inheritDoc} |
|
440 * @return the result of {@code defaultAction} |
|
441 */ |
|
442 @Override |
176 public R visitNewArray(NewArrayTree node, P p) { |
443 public R visitNewArray(NewArrayTree node, P p) { |
177 return defaultAction(node, p); |
444 return defaultAction(node, p); |
178 } |
445 } |
179 |
446 |
|
447 /** |
|
448 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
449 * |
|
450 * @param node {@inheritDoc} |
|
451 * @param p {@inheritDoc} |
|
452 * @return the result of {@code defaultAction} |
|
453 */ |
|
454 @Override |
180 public R visitLambdaExpression(LambdaExpressionTree node, P p) { |
455 public R visitLambdaExpression(LambdaExpressionTree node, P p) { |
181 return defaultAction(node, p); |
456 return defaultAction(node, p); |
182 } |
457 } |
183 |
458 |
|
459 /** |
|
460 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
461 * |
|
462 * @param node {@inheritDoc} |
|
463 * @param p {@inheritDoc} |
|
464 * @return the result of {@code defaultAction} |
|
465 */ |
|
466 @Override |
184 public R visitParenthesized(ParenthesizedTree node, P p) { |
467 public R visitParenthesized(ParenthesizedTree node, P p) { |
185 return defaultAction(node, p); |
468 return defaultAction(node, p); |
186 } |
469 } |
187 |
470 |
|
471 /** |
|
472 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
473 * |
|
474 * @param node {@inheritDoc} |
|
475 * @param p {@inheritDoc} |
|
476 * @return the result of {@code defaultAction} |
|
477 */ |
|
478 @Override |
188 public R visitAssignment(AssignmentTree node, P p) { |
479 public R visitAssignment(AssignmentTree node, P p) { |
189 return defaultAction(node, p); |
480 return defaultAction(node, p); |
190 } |
481 } |
191 |
482 |
|
483 /** |
|
484 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
485 * |
|
486 * @param node {@inheritDoc} |
|
487 * @param p {@inheritDoc} |
|
488 * @return the result of {@code defaultAction} |
|
489 */ |
|
490 @Override |
192 public R visitCompoundAssignment(CompoundAssignmentTree node, P p) { |
491 public R visitCompoundAssignment(CompoundAssignmentTree node, P p) { |
193 return defaultAction(node, p); |
492 return defaultAction(node, p); |
194 } |
493 } |
195 |
494 |
|
495 /** |
|
496 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
497 * |
|
498 * @param node {@inheritDoc} |
|
499 * @param p {@inheritDoc} |
|
500 * @return the result of {@code defaultAction} |
|
501 */ |
|
502 @Override |
196 public R visitUnary(UnaryTree node, P p) { |
503 public R visitUnary(UnaryTree node, P p) { |
197 return defaultAction(node, p); |
504 return defaultAction(node, p); |
198 } |
505 } |
199 |
506 |
|
507 /** |
|
508 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
509 * |
|
510 * @param node {@inheritDoc} |
|
511 * @param p {@inheritDoc} |
|
512 * @return the result of {@code defaultAction} |
|
513 */ |
|
514 @Override |
200 public R visitBinary(BinaryTree node, P p) { |
515 public R visitBinary(BinaryTree node, P p) { |
201 return defaultAction(node, p); |
516 return defaultAction(node, p); |
202 } |
517 } |
203 |
518 |
|
519 /** |
|
520 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
521 * |
|
522 * @param node {@inheritDoc} |
|
523 * @param p {@inheritDoc} |
|
524 * @return the result of {@code defaultAction} |
|
525 */ |
|
526 @Override |
204 public R visitTypeCast(TypeCastTree node, P p) { |
527 public R visitTypeCast(TypeCastTree node, P p) { |
205 return defaultAction(node, p); |
528 return defaultAction(node, p); |
206 } |
529 } |
207 |
530 |
|
531 /** |
|
532 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
533 * |
|
534 * @param node {@inheritDoc} |
|
535 * @param p {@inheritDoc} |
|
536 * @return the result of {@code defaultAction} |
|
537 */ |
|
538 @Override |
208 public R visitInstanceOf(InstanceOfTree node, P p) { |
539 public R visitInstanceOf(InstanceOfTree node, P p) { |
209 return defaultAction(node, p); |
540 return defaultAction(node, p); |
210 } |
541 } |
211 |
542 |
|
543 /** |
|
544 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
545 * |
|
546 * @param node {@inheritDoc} |
|
547 * @param p {@inheritDoc} |
|
548 * @return the result of {@code defaultAction} |
|
549 */ |
|
550 @Override |
212 public R visitArrayAccess(ArrayAccessTree node, P p) { |
551 public R visitArrayAccess(ArrayAccessTree node, P p) { |
213 return defaultAction(node, p); |
552 return defaultAction(node, p); |
214 } |
553 } |
215 |
554 |
|
555 /** |
|
556 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
557 * |
|
558 * @param node {@inheritDoc} |
|
559 * @param p {@inheritDoc} |
|
560 * @return the result of {@code defaultAction} |
|
561 */ |
|
562 @Override |
216 public R visitMemberSelect(MemberSelectTree node, P p) { |
563 public R visitMemberSelect(MemberSelectTree node, P p) { |
217 return defaultAction(node, p); |
564 return defaultAction(node, p); |
218 } |
565 } |
219 |
566 |
|
567 /** |
|
568 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
569 * |
|
570 * @param node {@inheritDoc} |
|
571 * @param p {@inheritDoc} |
|
572 * @return the result of {@code defaultAction} |
|
573 */ |
|
574 @Override |
220 public R visitMemberReference(MemberReferenceTree node, P p) { |
575 public R visitMemberReference(MemberReferenceTree node, P p) { |
221 return defaultAction(node, p); |
576 return defaultAction(node, p); |
222 } |
577 } |
223 |
578 |
|
579 /** |
|
580 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
581 * |
|
582 * @param node {@inheritDoc} |
|
583 * @param p {@inheritDoc} |
|
584 * @return the result of {@code defaultAction} |
|
585 */ |
|
586 @Override |
224 public R visitIdentifier(IdentifierTree node, P p) { |
587 public R visitIdentifier(IdentifierTree node, P p) { |
225 return defaultAction(node, p); |
588 return defaultAction(node, p); |
226 } |
589 } |
227 |
590 |
|
591 /** |
|
592 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
593 * |
|
594 * @param node {@inheritDoc} |
|
595 * @param p {@inheritDoc} |
|
596 * @return the result of {@code defaultAction} |
|
597 */ |
|
598 @Override |
228 public R visitLiteral(LiteralTree node, P p) { |
599 public R visitLiteral(LiteralTree node, P p) { |
229 return defaultAction(node, p); |
600 return defaultAction(node, p); |
230 } |
601 } |
231 |
602 |
|
603 /** |
|
604 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
605 * |
|
606 * @param node {@inheritDoc} |
|
607 * @param p {@inheritDoc} |
|
608 * @return the result of {@code defaultAction} |
|
609 */ |
|
610 @Override |
232 public R visitPrimitiveType(PrimitiveTypeTree node, P p) { |
611 public R visitPrimitiveType(PrimitiveTypeTree node, P p) { |
233 return defaultAction(node, p); |
612 return defaultAction(node, p); |
234 } |
613 } |
235 |
614 |
|
615 /** |
|
616 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
617 * |
|
618 * @param node {@inheritDoc} |
|
619 * @param p {@inheritDoc} |
|
620 * @return the result of {@code defaultAction} |
|
621 */ |
|
622 @Override |
236 public R visitArrayType(ArrayTypeTree node, P p) { |
623 public R visitArrayType(ArrayTypeTree node, P p) { |
237 return defaultAction(node, p); |
624 return defaultAction(node, p); |
238 } |
625 } |
239 |
626 |
|
627 /** |
|
628 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
629 * |
|
630 * @param node {@inheritDoc} |
|
631 * @param p {@inheritDoc} |
|
632 * @return the result of {@code defaultAction} |
|
633 */ |
|
634 @Override |
240 public R visitParameterizedType(ParameterizedTypeTree node, P p) { |
635 public R visitParameterizedType(ParameterizedTypeTree node, P p) { |
241 return defaultAction(node, p); |
636 return defaultAction(node, p); |
242 } |
637 } |
243 |
638 |
|
639 /** |
|
640 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
641 * |
|
642 * @param node {@inheritDoc} |
|
643 * @param p {@inheritDoc} |
|
644 * @return the result of {@code defaultAction} |
|
645 */ |
|
646 @Override |
244 public R visitUnionType(UnionTypeTree node, P p) { |
647 public R visitUnionType(UnionTypeTree node, P p) { |
245 return defaultAction(node, p); |
648 return defaultAction(node, p); |
246 } |
649 } |
247 |
650 |
|
651 /** |
|
652 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
653 * |
|
654 * @param node {@inheritDoc} |
|
655 * @param p {@inheritDoc} |
|
656 * @return the result of {@code defaultAction} |
|
657 */ |
|
658 @Override |
248 public R visitIntersectionType(IntersectionTypeTree node, P p) { |
659 public R visitIntersectionType(IntersectionTypeTree node, P p) { |
249 return defaultAction(node, p); |
660 return defaultAction(node, p); |
250 } |
661 } |
251 |
662 |
|
663 /** |
|
664 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
665 * |
|
666 * @param node {@inheritDoc} |
|
667 * @param p {@inheritDoc} |
|
668 * @return the result of {@code defaultAction} |
|
669 */ |
|
670 @Override |
252 public R visitTypeParameter(TypeParameterTree node, P p) { |
671 public R visitTypeParameter(TypeParameterTree node, P p) { |
253 return defaultAction(node, p); |
672 return defaultAction(node, p); |
254 } |
673 } |
255 |
674 |
|
675 /** |
|
676 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
677 * |
|
678 * @param node {@inheritDoc} |
|
679 * @param p {@inheritDoc} |
|
680 * @return the result of {@code defaultAction} |
|
681 */ |
|
682 @Override |
256 public R visitWildcard(WildcardTree node, P p) { |
683 public R visitWildcard(WildcardTree node, P p) { |
257 return defaultAction(node, p); |
684 return defaultAction(node, p); |
258 } |
685 } |
259 |
686 |
|
687 /** |
|
688 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
689 * |
|
690 * @param node {@inheritDoc} |
|
691 * @param p {@inheritDoc} |
|
692 * @return the result of {@code defaultAction} |
|
693 */ |
|
694 @Override |
260 public R visitModifiers(ModifiersTree node, P p) { |
695 public R visitModifiers(ModifiersTree node, P p) { |
261 return defaultAction(node, p); |
696 return defaultAction(node, p); |
262 } |
697 } |
263 |
698 |
|
699 /** |
|
700 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
701 * |
|
702 * @param node {@inheritDoc} |
|
703 * @param p {@inheritDoc} |
|
704 * @return the result of {@code defaultAction} |
|
705 */ |
|
706 @Override |
264 public R visitAnnotation(AnnotationTree node, P p) { |
707 public R visitAnnotation(AnnotationTree node, P p) { |
265 return defaultAction(node, p); |
708 return defaultAction(node, p); |
266 } |
709 } |
267 |
710 |
|
711 /** |
|
712 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
713 * |
|
714 * @param node {@inheritDoc} |
|
715 * @param p {@inheritDoc} |
|
716 * @return the result of {@code defaultAction} |
|
717 */ |
|
718 @Override |
268 public R visitAnnotatedType(AnnotatedTypeTree node, P p) { |
719 public R visitAnnotatedType(AnnotatedTypeTree node, P p) { |
269 return defaultAction(node, p); |
720 return defaultAction(node, p); |
270 } |
721 } |
271 |
722 |
|
723 /** |
|
724 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
725 * |
|
726 * @param node {@inheritDoc} |
|
727 * @param p {@inheritDoc} |
|
728 * @return the result of {@code defaultAction} |
|
729 */ |
|
730 @Override |
272 public R visitErroneous(ErroneousTree node, P p) { |
731 public R visitErroneous(ErroneousTree node, P p) { |
273 return defaultAction(node, p); |
732 return defaultAction(node, p); |
274 } |
733 } |
275 |
734 |
|
735 /** |
|
736 * {@inheritDoc} This implementation calls {@code defaultAction}. |
|
737 * |
|
738 * @param node {@inheritDoc} |
|
739 * @param p {@inheritDoc} |
|
740 * @return the result of {@code defaultAction} |
|
741 */ |
|
742 @Override |
276 public R visitOther(Tree node, P p) { |
743 public R visitOther(Tree node, P p) { |
277 return defaultAction(node, p); |
744 return defaultAction(node, p); |
278 } |
745 } |
279 } |
746 } |