1 /*
2 * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.source.util;
27
28 import com.sun.source.tree.*;
29 import jdk.internal.javac.PreviewFeature;
30
31 /**
32 * A simple visitor for tree nodes.
33 *
34 * @param <R> the return type of this visitor's methods. Use {@link
35 * Void} for visitors that do not need to return results.
36 * @param <P> the type of the additional parameter to this visitor's
37 * methods. Use {@code Void} for visitors that do not need an
38 * additional parameter.
39 *
40 * @author Peter von der Ahé
41 * @since 1.6
42 */
43 public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
44 /**
45 * The default value, returned by the {@link #defaultAction default action}.
46 */
47 protected final R DEFAULT_VALUE;
48
49 /**
50 * Creates a visitor, with a DEFAULT_VALUE of {@code null}.
51 */
52 protected SimpleTreeVisitor() {
53 DEFAULT_VALUE = null;
54 }
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 */
60 protected SimpleTreeVisitor(R defaultValue) {
61 DEFAULT_VALUE = defaultValue;
62 }
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 */
70 protected R defaultAction(Tree node, P p) {
71 return DEFAULT_VALUE;
72 }
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 */
80 public final R visit(Tree node, P p) {
81 return (node == null) ? null : node.accept(this, p);
82 }
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 */
91 public final R visit(Iterable<? extends Tree> nodes, P p) {
92 R r = null;
93 if (nodes != null)
94 for (Tree node : nodes)
95 r = visit(node, p);
96 return r;
97 }
98
99 /**
100 * {@inheritDoc}
101 *
102 * @implSpec This implementation calls {@code defaultAction}.
103 *
104 * @param node {@inheritDoc}
105 * @param p {@inheritDoc}
106 * @return the result of {@code defaultAction}
107 */
108 @Override
109 public R visitCompilationUnit(CompilationUnitTree node, P p) {
110 return defaultAction(node, p);
111 }
112
113 /**
114 * {@inheritDoc}
115 *
116 * @implSpec This implementation calls {@code defaultAction}.
117 *
118 * @param node {@inheritDoc}
119 * @param p {@inheritDoc}
120 * @return the result of {@code defaultAction}
121 */
122 @Override
123 public R visitPackage(PackageTree node, P p) {
124 return defaultAction(node, p);
125 }
126
127 /**
128 * {@inheritDoc}
129 *
130 * @implSpec This implementation calls {@code defaultAction}.
131 *
132 * @param node {@inheritDoc}
133 * @param p {@inheritDoc}
134 * @return the result of {@code defaultAction}
135 */
136 @Override
137 public R visitImport(ImportTree node, P p) {
138 return defaultAction(node, p);
139 }
140
141 /**
142 * {@inheritDoc}
143 *
144 * @implSpec This implementation calls {@code defaultAction}.
145 *
146 * @param node {@inheritDoc}
147 * @param p {@inheritDoc}
148 * @return the result of {@code defaultAction}
149 */
150 @Override
151 public R visitClass(ClassTree node, P p) {
152 return defaultAction(node, p);
153 }
154
155 /**
156 * {@inheritDoc}
157 *
158 * @implSpec This implementation calls {@code defaultAction}.
159 *
160 * @param node {@inheritDoc}
161 * @param p {@inheritDoc}
162 * @return the result of {@code defaultAction}
163 */
164 @Override
165 public R visitMethod(MethodTree node, P p) {
166 return defaultAction(node, p);
167 }
168
169 /**
170 * {@inheritDoc}
171 *
172 * @implSpec This implementation calls {@code defaultAction}.
173 *
174 * @param node {@inheritDoc}
175 * @param p {@inheritDoc}
176 * @return the result of {@code defaultAction}
177 */
178 @Override
179 public R visitVariable(VariableTree node, P p) {
180 return defaultAction(node, p);
181 }
182
183 /**
184 * {@inheritDoc}
185 *
186 * @implSpec This implementation calls {@code defaultAction}.
187 *
188 * @param node {@inheritDoc}
189 * @param p {@inheritDoc}
190 * @return the result of {@code defaultAction}
191 */
192 @Override
193 public R visitEmptyStatement(EmptyStatementTree node, P p) {
194 return defaultAction(node, p);
195 }
196
197 /**
198 * {@inheritDoc}
199 *
200 * @implSpec This implementation calls {@code defaultAction}.
201 *
202 * @param node {@inheritDoc}
203 * @param p {@inheritDoc}
204 * @return the result of {@code defaultAction}
205 */
206 @Override
207 public R visitBlock(BlockTree node, P p) {
208 return defaultAction(node, p);
209 }
210
211 /**
212 * {@inheritDoc}
213 *
214 * @implSpec This implementation calls {@code defaultAction}.
215 *
216 * @param node {@inheritDoc}
217 * @param p {@inheritDoc}
218 * @return the result of {@code defaultAction}
219 */
220 @Override
221 public R visitDoWhileLoop(DoWhileLoopTree node, P p) {
222 return defaultAction(node, p);
223 }
224
225 /**
226 * {@inheritDoc}
227 *
228 * @implSpec This implementation calls {@code defaultAction}.
229 *
230 * @param node {@inheritDoc}
231 * @param p {@inheritDoc}
232 * @return the result of {@code defaultAction}
233 */
234 @Override
235 public R visitWhileLoop(WhileLoopTree node, P p) {
236 return defaultAction(node, p);
237 }
238
239 /**
240 * {@inheritDoc} This implementation calls {@code defaultAction}.
241 *
242 * @param node {@inheritDoc}
243 * @param p {@inheritDoc}
244 * @return the result of {@code defaultAction}
245 */
246 @Override
247 public R visitForLoop(ForLoopTree node, P p) {
248 return defaultAction(node, p);
249 }
250
251 /**
252 * {@inheritDoc}
253 *
254 * @implSpec This implementation calls {@code defaultAction}.
255 *
256 * @param node {@inheritDoc}
257 * @param p {@inheritDoc}
258 * @return the result of {@code defaultAction}
259 */
260 @Override
261 public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) {
262 return defaultAction(node, p);
263 }
264
265 /**
266 * {@inheritDoc}
267 *
268 * @implSpec This implementation calls {@code defaultAction}.
269 *
270 * @param node {@inheritDoc}
271 * @param p {@inheritDoc}
272 * @return the result of {@code defaultAction}
273 */
274 @Override
275 public R visitLabeledStatement(LabeledStatementTree node, P p) {
276 return defaultAction(node, p);
277 }
278
279 /**
280 * {@inheritDoc}
281 *
282 * @implSpec This implementation calls {@code defaultAction}.
283 *
284 * @param node {@inheritDoc}
285 * @param p {@inheritDoc}
286 * @return the result of {@code defaultAction}
287 */
288 @Override
289 public R visitSwitch(SwitchTree node, P p) {
290 return defaultAction(node, p);
291 }
292
293 /**
294 * {@inheritDoc}
295 *
296 * @implSpec This implementation calls {@code defaultAction}.
297 *
298 * @param node {@inheritDoc}
299 * @param p {@inheritDoc}
300 * @return the result of {@code defaultAction}
301 */
302 @Override
303 public R visitSwitchExpression(SwitchExpressionTree node, P p) {
304 return defaultAction(node, p);
305 }
306
307 /**
308 * {@inheritDoc}
309 *
310 * @implSpec This implementation calls {@code defaultAction}.
311 *
312 * @param node {@inheritDoc}
313 * @param p {@inheritDoc}
314 * @return the result of {@code defaultAction}
315 */
316 @Override
317 public R visitCase(CaseTree node, P p) {
318 return defaultAction(node, p);
319 }
320
321 /**
322 * {@inheritDoc}
323 *
324 * @implSpec This implementation calls {@code defaultAction}.
325 *
326 * @param node {@inheritDoc}
327 * @param p {@inheritDoc}
328 * @return the result of {@code defaultAction}
329 */
330 @Override
331 public R visitSynchronized(SynchronizedTree node, P p) {
332 return defaultAction(node, p);
333 }
334
335 /**
336 * {@inheritDoc}
337 *
338 * @implSpec This implementation calls {@code defaultAction}.
339 *
340 * @param node {@inheritDoc}
341 * @param p {@inheritDoc}
342 * @return the result of {@code defaultAction}
343 */
344 @Override
345 public R visitTry(TryTree node, P p) {
346 return defaultAction(node, p);
347 }
348
349 /**
350 * {@inheritDoc}
351 *
352 * @implSpec This implementation calls {@code defaultAction}.
353 *
354 * @param node {@inheritDoc}
355 * @param p {@inheritDoc}
356 * @return the result of {@code defaultAction}
357 */
358 @Override
359 public R visitCatch(CatchTree node, P p) {
360 return defaultAction(node, p);
361 }
362
363 /**
364 * {@inheritDoc}
365 *
366 * @implSpec This implementation calls {@code defaultAction}.
367 *
368 * @param node {@inheritDoc}
369 * @param p {@inheritDoc}
370 * @return the result of {@code defaultAction}
371 */
372 @Override
373 public R visitConditionalExpression(ConditionalExpressionTree node, P p) {
374 return defaultAction(node, p);
375 }
376
377 /**
378 * {@inheritDoc}
379 *
380 * @implSpec This implementation calls {@code defaultAction}.
381 *
382 * @param node {@inheritDoc}
383 * @param p {@inheritDoc}
384 * @return the result of {@code defaultAction}
385 */
386 @Override
387 public R visitIf(IfTree node, P p) {
388 return defaultAction(node, p);
389 }
390
391 /**
392 * {@inheritDoc}
393 *
394 * @implSpec This implementation calls {@code defaultAction}.
395 *
396 * @param node {@inheritDoc}
397 * @param p {@inheritDoc}
398 * @return the result of {@code defaultAction}
399 */
400 @Override
401 public R visitExpressionStatement(ExpressionStatementTree node, P p) {
402 return defaultAction(node, p);
403 }
404
405 /**
406 * {@inheritDoc}
407 *
408 * @implSpec This implementation calls {@code defaultAction}.
409 *
410 * @param node {@inheritDoc}
411 * @param p {@inheritDoc}
412 * @return the result of {@code defaultAction}
413 */
414 @Override
415 public R visitBreak(BreakTree node, P p) {
416 return defaultAction(node, p);
417 }
418
419 /**
420 * {@inheritDoc}
421 *
422 * @implSpec This implementation calls {@code defaultAction}.
423 *
424 * @param node {@inheritDoc}
425 * @param p {@inheritDoc}
426 * @return the result of {@code defaultAction}
427 */
428 @Override
429 public R visitContinue(ContinueTree node, P p) {
430 return defaultAction(node, p);
431 }
432
433 /**
434 * {@inheritDoc}
435 *
436 * @implSpec This implementation calls {@code defaultAction}.
437 *
438 * @param node {@inheritDoc}
439 * @param p {@inheritDoc}
440 * @return the result of {@code defaultAction}
441 */
442 @Override
443 public R visitReturn(ReturnTree node, P p) {
444 return defaultAction(node, p);
445 }
446
447 /**
448 * {@inheritDoc}
449 *
450 * @implSpec This implementation calls {@code defaultAction}.
451 *
452 * @param node {@inheritDoc}
453 * @param p {@inheritDoc}
454 * @return the result of {@code defaultAction}
455 */
456 @Override
457 public R visitThrow(ThrowTree node, P p) {
458 return defaultAction(node, p);
459 }
460
461 /**
462 * {@inheritDoc}
463 *
464 * @implSpec This implementation calls {@code defaultAction}.
465 *
466 * @param node {@inheritDoc}
467 * @param p {@inheritDoc}
468 * @return the result of {@code defaultAction}
469 */
470 @Override
471 public R visitAssert(AssertTree node, P p) {
472 return defaultAction(node, p);
473 }
474
475 /**
476 * {@inheritDoc}
477 *
478 * @implSpec This implementation calls {@code defaultAction}.
479 *
480 * @param node {@inheritDoc}
481 * @param p {@inheritDoc}
482 * @return the result of {@code defaultAction}
483 */
484 @Override
485 public R visitMethodInvocation(MethodInvocationTree node, P p) {
486 return defaultAction(node, p);
487 }
488
489 /**
490 * {@inheritDoc}
491 *
492 * @implSpec This implementation calls {@code defaultAction}.
493 *
494 * @param node {@inheritDoc}
495 * @param p {@inheritDoc}
496 * @return the result of {@code defaultAction}
497 */
498 @Override
499 public R visitNewClass(NewClassTree node, P p) {
500 return defaultAction(node, p);
501 }
502
503 /**
504 * {@inheritDoc}
505 *
506 * @implSpec This implementation calls {@code defaultAction}.
507 *
508 * @param node {@inheritDoc}
509 * @param p {@inheritDoc}
510 * @return the result of {@code defaultAction}
511 */
512 @Override
513 public R visitNewArray(NewArrayTree node, P p) {
514 return defaultAction(node, p);
515 }
516
517 /**
518 * {@inheritDoc}
519 *
520 * @implSpec This implementation calls {@code defaultAction}.
521 *
522 * @param node {@inheritDoc}
523 * @param p {@inheritDoc}
524 * @return the result of {@code defaultAction}
525 */
526 @Override
527 public R visitLambdaExpression(LambdaExpressionTree node, P p) {
528 return defaultAction(node, p);
529 }
530
531 /**
532 * {@inheritDoc}
533 *
534 * @implSpec This implementation calls {@code defaultAction}.
535 *
536 * @param node {@inheritDoc}
537 * @param p {@inheritDoc}
538 * @return the result of {@code defaultAction}
539 */
540 @Override
541 public R visitParenthesized(ParenthesizedTree node, P p) {
542 return defaultAction(node, p);
543 }
544
545 /**
546 * {@inheritDoc}
547 *
548 * @implSpec This implementation calls {@code defaultAction}.
549 *
550 * @param node {@inheritDoc}
551 * @param p {@inheritDoc}
552 * @return the result of {@code defaultAction}
553 */
554 @Override
555 public R visitAssignment(AssignmentTree node, P p) {
556 return defaultAction(node, p);
557 }
558
559 /**
560 * {@inheritDoc}
561 *
562 * @implSpec This implementation calls {@code defaultAction}.
563 *
564 * @param node {@inheritDoc}
565 * @param p {@inheritDoc}
566 * @return the result of {@code defaultAction}
567 */
568 @Override
569 public R visitCompoundAssignment(CompoundAssignmentTree node, P p) {
570 return defaultAction(node, p);
571 }
572
573 /**
574 * {@inheritDoc}
575 *
576 * @implSpec This implementation calls {@code defaultAction}.
577 *
578 * @param node {@inheritDoc}
579 * @param p {@inheritDoc}
580 * @return the result of {@code defaultAction}
581 */
582 @Override
583 public R visitUnary(UnaryTree node, P p) {
584 return defaultAction(node, p);
585 }
586
587 /**
588 * {@inheritDoc}
589 *
590 * @implSpec This implementation calls {@code defaultAction}.
591 *
592 * @param node {@inheritDoc}
593 * @param p {@inheritDoc}
594 * @return the result of {@code defaultAction}
595 */
596 @Override
597 public R visitBinary(BinaryTree node, P p) {
598 return defaultAction(node, p);
599 }
600
601 /**
602 * {@inheritDoc}
603 *
604 * @implSpec This implementation calls {@code defaultAction}.
605 *
606 * @param node {@inheritDoc}
607 * @param p {@inheritDoc}
608 * @return the result of {@code defaultAction}
609 */
610 @Override
611 public R visitTypeCast(TypeCastTree node, P p) {
612 return defaultAction(node, p);
613 }
614
615 /**
616 * {@inheritDoc}
617 *
618 * @implSpec This implementation calls {@code defaultAction}.
619 *
620 * @param node {@inheritDoc}
621 * @param p {@inheritDoc}
622 * @return the result of {@code defaultAction}
623 */
624 @Override
625 public R visitInstanceOf(InstanceOfTree node, P p) {
626 return defaultAction(node, p);
627 }
628
629 /**
630 * {@inheritDoc} This implementation calls {@code defaultAction}.
631 *
632 * @param node {@inheritDoc}
633 * @param p {@inheritDoc}
634 * @return the result of {@code defaultAction}
635 * @since 21
636 */
637 @Override
638 @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES, reflective=true)
639 public R visitStringTemplate(StringTemplateTree node, P p) {
640 return defaultAction(node, p);
641 }
642
643 /**
644 * {@inheritDoc}
645 *
646 * @implSpec This implementation calls {@code defaultAction}.
647 *
648 * @param node {@inheritDoc}
649 * @param p {@inheritDoc}
650 * @return the result of {@code defaultAction}
651 * @since 22
652 */
653 @Override
654 public R visitAnyPattern(AnyPatternTree node, P p) {
655 return defaultAction(node, p);
656 }
657
658 /**
659 * {@inheritDoc}
660 *
661 * @implSpec This implementation calls {@code defaultAction}.
662 *
663 * @param node {@inheritDoc}
664 * @param p {@inheritDoc}
665 * @return the result of {@code defaultAction}
666 * @since 14
667 */
668 @Override
669 public R visitBindingPattern(BindingPatternTree node, P p) {
670 return defaultAction(node, p);
671 }
672
673 /**
674 * {@inheritDoc}
675 *
676 * @implSpec This implementation calls {@code defaultAction}.
677 *
678 * @param node {@inheritDoc}
679 * @param p {@inheritDoc}
680 * @return the result of {@code defaultAction}
681 * @since 21
682 */
683 @Override
684 public R visitDefaultCaseLabel(DefaultCaseLabelTree node, P p) {
685 return defaultAction(node, p);
686 }
687
688 /**
689 * {@inheritDoc}
690 *
691 * @implSpec This implementation calls {@code defaultAction}.
692 *
693 * @param node {@inheritDoc}
694 * @param p {@inheritDoc}
695 * @return the result of {@code defaultAction}
696 * @since 21
697 */
698 @Override
699 public R visitConstantCaseLabel(ConstantCaseLabelTree node, P p) {
700 return defaultAction(node, p);
701 }
702
703 /**
704 * {@inheritDoc}
705 *
706 * @implSpec This implementation calls {@code defaultAction}.
707 *
708 * @param node {@inheritDoc}
709 * @param p {@inheritDoc}
710 * @return the result of {@code defaultAction}
711 * @since 21
712 */
713 @Override
714 public R visitDeconstructionPattern(DeconstructionPatternTree node, P p) {
715 return defaultAction(node, p);
716 }
717
718 /**
719 * {@inheritDoc}
720 *
721 * @implSpec This implementation calls {@code defaultAction}.
722 *
723 * @param node {@inheritDoc}
724 * @param p {@inheritDoc}
725 * @return the result of {@code defaultAction}
726 * @since 21
727 */
728 @Override
729 public R visitPatternCaseLabel(PatternCaseLabelTree node, P p) {
730 return defaultAction(node, p);
731 }
732
733 /**
734 * {@inheritDoc}
735 *
736 * @implSpec This implementation calls {@code defaultAction}.
737 *
738 * @param node {@inheritDoc}
739 * @param p {@inheritDoc}
740 * @return the result of {@code defaultAction}
741 */
742 @Override
743 public R visitArrayAccess(ArrayAccessTree node, P p) {
744 return defaultAction(node, p);
745 }
746
747 /**
748 * {@inheritDoc}
749 *
750 * @implSpec This implementation calls {@code defaultAction}.
751 *
752 * @param node {@inheritDoc}
753 * @param p {@inheritDoc}
754 * @return the result of {@code defaultAction}
755 */
756 @Override
757 public R visitMemberSelect(MemberSelectTree node, P p) {
758 return defaultAction(node, p);
759 }
760
761 /**
762 * {@inheritDoc}
763 *
764 * @implSpec This implementation calls {@code defaultAction}.
765 *
766 * @param node {@inheritDoc}
767 * @param p {@inheritDoc}
768 * @return the result of {@code defaultAction}
769 */
770 @Override
771 public R visitMemberReference(MemberReferenceTree node, P p) {
772 return defaultAction(node, p);
773 }
774
775 /**
776 * {@inheritDoc}
777 *
778 * @implSpec This implementation calls {@code defaultAction}.
779 *
780 * @param node {@inheritDoc}
781 * @param p {@inheritDoc}
782 * @return the result of {@code defaultAction}
783 */
784 @Override
785 public R visitIdentifier(IdentifierTree node, P p) {
786 return defaultAction(node, p);
787 }
788
789 /**
790 * {@inheritDoc}
791 *
792 * @implSpec This implementation calls {@code defaultAction}.
793 *
794 * @param node {@inheritDoc}
795 * @param p {@inheritDoc}
796 * @return the result of {@code defaultAction}
797 */
798 @Override
799 public R visitLiteral(LiteralTree node, P p) {
800 return defaultAction(node, p);
801 }
802
803 /**
804 * {@inheritDoc}
805 *
806 * @implSpec This implementation calls {@code defaultAction}.
807 *
808 * @param node {@inheritDoc}
809 * @param p {@inheritDoc}
810 * @return the result of {@code defaultAction}
811 */
812 @Override
813 public R visitPrimitiveType(PrimitiveTypeTree node, P p) {
814 return defaultAction(node, p);
815 }
816
817 /**
818 * {@inheritDoc}
819 *
820 * @implSpec This implementation calls {@code defaultAction}.
821 *
822 * @param node {@inheritDoc}
823 * @param p {@inheritDoc}
824 * @return the result of {@code defaultAction}
825 */
826 @Override
827 public R visitArrayType(ArrayTypeTree node, P p) {
828 return defaultAction(node, p);
829 }
830
831 /**
832 * {@inheritDoc}
833 *
834 * @implSpec This implementation calls {@code defaultAction}.
835 *
836 * @param node {@inheritDoc}
837 * @param p {@inheritDoc}
838 * @return the result of {@code defaultAction}
839 */
840 @Override
841 public R visitParameterizedType(ParameterizedTypeTree node, P p) {
842 return defaultAction(node, p);
843 }
844
845 /**
846 * {@inheritDoc}
847 *
848 * @implSpec This implementation calls {@code defaultAction}.
849 *
850 * @param node {@inheritDoc}
851 * @param p {@inheritDoc}
852 * @return the result of {@code defaultAction}
853 */
854 @Override
855 public R visitUnionType(UnionTypeTree node, P p) {
856 return defaultAction(node, p);
857 }
858
859 /**
860 * {@inheritDoc}
861 *
862 * @implSpec This implementation calls {@code defaultAction}.
863 *
864 * @param node {@inheritDoc}
865 * @param p {@inheritDoc}
866 * @return the result of {@code defaultAction}
867 */
868 @Override
869 public R visitIntersectionType(IntersectionTypeTree node, P p) {
870 return defaultAction(node, p);
871 }
872
873 /**
874 * {@inheritDoc}
875 *
876 * @implSpec This implementation calls {@code defaultAction}.
877 *
878 * @param node {@inheritDoc}
879 * @param p {@inheritDoc}
880 * @return the result of {@code defaultAction}
881 */
882 @Override
883 public R visitTypeParameter(TypeParameterTree node, P p) {
884 return defaultAction(node, p);
885 }
886
887 /**
888 * {@inheritDoc}
889 *
890 * @implSpec This implementation calls {@code defaultAction}.
891 *
892 * @param node {@inheritDoc}
893 * @param p {@inheritDoc}
894 * @return the result of {@code defaultAction}
895 */
896 @Override
897 public R visitWildcard(WildcardTree node, P p) {
898 return defaultAction(node, p);
899 }
900
901 /**
902 * {@inheritDoc}
903 *
904 * @implSpec This implementation calls {@code defaultAction}.
905 *
906 * @param node {@inheritDoc}
907 * @param p {@inheritDoc}
908 * @return the result of {@code defaultAction}
909 */
910 @Override
911 public R visitModifiers(ModifiersTree node, P p) {
912 return defaultAction(node, p);
913 }
914
915 /**
916 * {@inheritDoc}
917 *
918 * @implSpec This implementation calls {@code defaultAction}.
919 *
920 * @param node {@inheritDoc}
921 * @param p {@inheritDoc}
922 * @return the result of {@code defaultAction}
923 */
924 @Override
925 public R visitAnnotation(AnnotationTree node, P p) {
926 return defaultAction(node, p);
927 }
928
929 /**
930 * {@inheritDoc}
931 *
932 * @implSpec This implementation calls {@code defaultAction}.
933 *
934 * @param node {@inheritDoc}
935 * @param p {@inheritDoc}
936 * @return the result of {@code defaultAction}
937 */
938 @Override
939 public R visitAnnotatedType(AnnotatedTypeTree node, P p) {
940 return defaultAction(node, p);
941 }
942
943 /**
944 * {@inheritDoc}
945 *
946 * @implSpec This implementation calls {@code defaultAction}.
947 *
948 * @param node {@inheritDoc}
949 * @param p {@inheritDoc}
950 * @return the result of {@code defaultAction}
951 */
952 @Override
953 public R visitModule(ModuleTree node, P p) {
954 return defaultAction(node, p);
955 }
956
957 /**
958 * {@inheritDoc}
959 *
960 * @implSpec This implementation calls {@code defaultAction}.
961 *
962 * @param node {@inheritDoc}
963 * @param p {@inheritDoc}
964 * @return the result of {@code defaultAction}
965 */
966 @Override
967 public R visitExports(ExportsTree node, P p) {
968 return defaultAction(node, p);
969 }
970
971 /**
972 * {@inheritDoc}
973 *
974 * @implSpec This implementation calls {@code defaultAction}.
975 *
976 * @param node {@inheritDoc}
977 * @param p {@inheritDoc}
978 * @return the result of {@code defaultAction}
979 */
980 @Override
981 public R visitOpens(OpensTree node, P p) {
982 return defaultAction(node, p);
983 }
984
985 /**
986 * {@inheritDoc}
987 *
988 * @implSpec This implementation calls {@code defaultAction}.
989 *
990 * @param node {@inheritDoc}
991 * @param p {@inheritDoc}
992 * @return the result of {@code defaultAction}
993 */
994 @Override
995 public R visitProvides(ProvidesTree node, P p) {
996 return defaultAction(node, p);
997 }
998
999 /**
1000 * {@inheritDoc}
1001 *
1002 * @implSpec This implementation calls {@code defaultAction}.
1003 *
1004 * @param node {@inheritDoc}
1005 * @param p {@inheritDoc}
1006 * @return the result of {@code defaultAction}
1007 */
1008 @Override
1009 public R visitRequires(RequiresTree node, P p) {
1010 return defaultAction(node, p);
1011 }
1012
1013 /**
1014 * {@inheritDoc}
1015 *
1016 * @implSpec This implementation calls {@code defaultAction}.
1017 *
1018 * @param node {@inheritDoc}
1019 * @param p {@inheritDoc}
1020 * @return the result of {@code defaultAction}
1021 */
1022 @Override
1023 public R visitUses(UsesTree node, P p) {
1024 return defaultAction(node, p);
1025 }
1026
1027 /**
1028 * {@inheritDoc}
1029 *
1030 * @implSpec This implementation calls {@code defaultAction}.
1031 *
1032 * @param node {@inheritDoc}
1033 * @param p {@inheritDoc}
1034 * @return the result of {@code defaultAction}
1035 */
1036 @Override
1037 public R visitErroneous(ErroneousTree node, P p) {
1038 return defaultAction(node, p);
1039 }
1040
1041 /**
1042 * {@inheritDoc}
1043 *
1044 * @implSpec This implementation calls {@code defaultAction}.
1045 *
1046 * @param node {@inheritDoc}
1047 * @param p {@inheritDoc}
1048 * @return the result of {@code defaultAction}
1049 */
1050 @Override
1051 public R visitOther(Tree node, P p) {
1052 return defaultAction(node, p);
1053 }
1054
1055 /**
1056 * {@inheritDoc}
1057 *
1058 * @implSpec This implementation calls {@code defaultAction}.
1059 *
1060 * @param node {@inheritDoc}
1061 * @param p {@inheritDoc}
1062 * @return the result of {@code defaultAction}
1063 */
1064 @Override
1065 public R visitYield(YieldTree node, P p) {
1066 return defaultAction(node, p);
1067 }
1068 }
--- EOF ---