JavaParser Source Viewer

Home|JavaParser/com/github/javaparser/ast/visitor/GenericVisitorAdapter.java
1/*
2 * Copyright (C) 2007-2010 JĂșlio Vilmar Gesser.
3 * Copyright (C) 2011, 2013-2020 The JavaParser Team.
4 *
5 * This file is part of JavaParser.
6 *
7 * JavaParser can be used either under the terms of
8 * a) the GNU Lesser General Public License as published by
9 *     the Free Software Foundation, either version 3 of the License, or
10 *     (at your option) any later version.
11 * b) the terms of the Apache License
12 *
13 * You should have received a copy of both licenses in LICENCE.LGPL and
14 * LICENCE.APACHE. Please refer to those files for details.
15 *
16 * JavaParser is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 * GNU Lesser General Public License for more details.
20 */
21package com.github.javaparser.ast.visitor;
22
23import com.github.javaparser.ast.*;
24import com.github.javaparser.ast.body.*;
25import com.github.javaparser.ast.comments.BlockComment;
26import com.github.javaparser.ast.comments.JavadocComment;
27import com.github.javaparser.ast.comments.LineComment;
28import com.github.javaparser.ast.expr.*;
29import com.github.javaparser.ast.modules.*;
30import com.github.javaparser.ast.stmt.*;
31import com.github.javaparser.ast.type.*;
32
33/**
34 * A visitor that has a return value (R), and has a default implementation for all its visit
35 * methods that visits their children in an unspecified order, and the first visit method
36 * that returns a value will stop the visitation and be the end result.
37 *
38 * @author Julio Vilmar Gesser
39 */
40public abstract class GenericVisitorAdapter<RA> implements GenericVisitor<RA> {
41
42    @Override
43    public R visit(final AnnotationDeclaration nfinal A arg) {
44        R result;
45        {
46            result = n.getMembers().accept(this, arg);
47            if (result != null)
48                return result;
49        }
50        {
51            result = n.getModifiers().accept(this, arg);
52            if (result != null)
53                return result;
54        }
55        {
56            result = n.getName().accept(this, arg);
57            if (result != null)
58                return result;
59        }
60        {
61            result = n.getAnnotations().accept(this, arg);
62            if (result != null)
63                return result;
64        }
65        if (n.getComment().isPresent()) {
66            result = n.getComment().get().accept(this, arg);
67            if (result != null)
68                return result;
69        }
70        return null;
71    }
72
73    @Override
74    public R visit(final AnnotationMemberDeclaration nfinal A arg) {
75        R result;
76        if (n.getDefaultValue().isPresent()) {
77            result = n.getDefaultValue().get().accept(this, arg);
78            if (result != null)
79                return result;
80        }
81        {
82            result = n.getModifiers().accept(this, arg);
83            if (result != null)
84                return result;
85        }
86        {
87            result = n.getName().accept(this, arg);
88            if (result != null)
89                return result;
90        }
91        {
92            result = n.getType().accept(this, arg);
93            if (result != null)
94                return result;
95        }
96        {
97            result = n.getAnnotations().accept(this, arg);
98            if (result != null)
99                return result;
100        }
101        if (n.getComment().isPresent()) {
102            result = n.getComment().get().accept(this, arg);
103            if (result != null)
104                return result;
105        }
106        return null;
107    }
108
109    @Override
110    public R visit(final ArrayAccessExpr nfinal A arg) {
111        R result;
112        {
113            result = n.getIndex().accept(this, arg);
114            if (result != null)
115                return result;
116        }
117        {
118            result = n.getName().accept(this, arg);
119            if (result != null)
120                return result;
121        }
122        if (n.getComment().isPresent()) {
123            result = n.getComment().get().accept(this, arg);
124            if (result != null)
125                return result;
126        }
127        return null;
128    }
129
130    @Override
131    public R visit(final ArrayCreationExpr nfinal A arg) {
132        R result;
133        {
134            result = n.getElementType().accept(this, arg);
135            if (result != null)
136                return result;
137        }
138        if (n.getInitializer().isPresent()) {
139            result = n.getInitializer().get().accept(this, arg);
140            if (result != null)
141                return result;
142        }
143        {
144            result = n.getLevels().accept(this, arg);
145            if (result != null)
146                return result;
147        }
148        if (n.getComment().isPresent()) {
149            result = n.getComment().get().accept(this, arg);
150            if (result != null)
151                return result;
152        }
153        return null;
154    }
155
156    @Override
157    public R visit(final ArrayInitializerExpr nfinal A arg) {
158        R result;
159        {
160            result = n.getValues().accept(this, arg);
161            if (result != null)
162                return result;
163        }
164        if (n.getComment().isPresent()) {
165            result = n.getComment().get().accept(this, arg);
166            if (result != null)
167                return result;
168        }
169        return null;
170    }
171
172    @Override
173    public R visit(final AssertStmt nfinal A arg) {
174        R result;
175        {
176            result = n.getCheck().accept(this, arg);
177            if (result != null)
178                return result;
179        }
180        if (n.getMessage().isPresent()) {
181            result = n.getMessage().get().accept(this, arg);
182            if (result != null)
183                return result;
184        }
185        if (n.getComment().isPresent()) {
186            result = n.getComment().get().accept(this, arg);
187            if (result != null)
188                return result;
189        }
190        return null;
191    }
192
193    @Override
194    public R visit(final AssignExpr nfinal A arg) {
195        R result;
196        {
197            result = n.getTarget().accept(this, arg);
198            if (result != null)
199                return result;
200        }
201        {
202            result = n.getValue().accept(this, arg);
203            if (result != null)
204                return result;
205        }
206        if (n.getComment().isPresent()) {
207            result = n.getComment().get().accept(this, arg);
208            if (result != null)
209                return result;
210        }
211        return null;
212    }
213
214    @Override
215    public R visit(final BinaryExpr nfinal A arg) {
216        R result;
217        {
218            result = n.getLeft().accept(this, arg);
219            if (result != null)
220                return result;
221        }
222        {
223            result = n.getRight().accept(this, arg);
224            if (result != null)
225                return result;
226        }
227        if (n.getComment().isPresent()) {
228            result = n.getComment().get().accept(this, arg);
229            if (result != null)
230                return result;
231        }
232        return null;
233    }
234
235    @Override
236    public R visit(final BlockStmt nfinal A arg) {
237        R result;
238        {
239            result = n.getStatements().accept(this, arg);
240            if (result != null)
241                return result;
242        }
243        if (n.getComment().isPresent()) {
244            result = n.getComment().get().accept(this, arg);
245            if (result != null)
246                return result;
247        }
248        return null;
249    }
250
251    @Override
252    public R visit(final BooleanLiteralExpr nfinal A arg) {
253        R result;
254        if (n.getComment().isPresent()) {
255            result = n.getComment().get().accept(this, arg);
256            if (result != null)
257                return result;
258        }
259        return null;
260    }
261
262    @Override
263    public R visit(final BreakStmt nfinal A arg) {
264        R result;
265        if (n.getLabel().isPresent()) {
266            result = n.getLabel().get().accept(this, arg);
267            if (result != null)
268                return result;
269        }
270        if (n.getComment().isPresent()) {
271            result = n.getComment().get().accept(this, arg);
272            if (result != null)
273                return result;
274        }
275        return null;
276    }
277
278    @Override
279    public R visit(final CastExpr nfinal A arg) {
280        R result;
281        {
282            result = n.getExpression().accept(this, arg);
283            if (result != null)
284                return result;
285        }
286        {
287            result = n.getType().accept(this, arg);
288            if (result != null)
289                return result;
290        }
291        if (n.getComment().isPresent()) {
292            result = n.getComment().get().accept(this, arg);
293            if (result != null)
294                return result;
295        }
296        return null;
297    }
298
299    @Override
300    public R visit(final CatchClause nfinal A arg) {
301        R result;
302        {
303            result = n.getBody().accept(this, arg);
304            if (result != null)
305                return result;
306        }
307        {
308            result = n.getParameter().accept(this, arg);
309            if (result != null)
310                return result;
311        }
312        if (n.getComment().isPresent()) {
313            result = n.getComment().get().accept(this, arg);
314            if (result != null)
315                return result;
316        }
317        return null;
318    }
319
320    @Override
321    public R visit(final CharLiteralExpr nfinal A arg) {
322        R result;
323        if (n.getComment().isPresent()) {
324            result = n.getComment().get().accept(this, arg);
325            if (result != null)
326                return result;
327        }
328        return null;
329    }
330
331    @Override
332    public R visit(final ClassExpr nfinal A arg) {
333        R result;
334        {
335            result = n.getType().accept(this, arg);
336            if (result != null)
337                return result;
338        }
339        if (n.getComment().isPresent()) {
340            result = n.getComment().get().accept(this, arg);
341            if (result != null)
342                return result;
343        }
344        return null;
345    }
346
347    @Override
348    public R visit(final ClassOrInterfaceDeclaration nfinal A arg) {
349        R result;
350        {
351            result = n.getExtendedTypes().accept(this, arg);
352            if (result != null)
353                return result;
354        }
355        {
356            result = n.getImplementedTypes().accept(this, arg);
357            if (result != null)
358                return result;
359        }
360        {
361            result = n.getTypeParameters().accept(this, arg);
362            if (result != null)
363                return result;
364        }
365        {
366            result = n.getMembers().accept(this, arg);
367            if (result != null)
368                return result;
369        }
370        {
371            result = n.getModifiers().accept(this, arg);
372            if (result != null)
373                return result;
374        }
375        {
376            result = n.getName().accept(this, arg);
377            if (result != null)
378                return result;
379        }
380        {
381            result = n.getAnnotations().accept(this, arg);
382            if (result != null)
383                return result;
384        }
385        if (n.getComment().isPresent()) {
386            result = n.getComment().get().accept(this, arg);
387            if (result != null)
388                return result;
389        }
390        return null;
391    }
392
393    @Override
394    public R visit(final ClassOrInterfaceType nfinal A arg) {
395        R result;
396        {
397            result = n.getName().accept(this, arg);
398            if (result != null)
399                return result;
400        }
401        if (n.getScope().isPresent()) {
402            result = n.getScope().get().accept(this, arg);
403            if (result != null)
404                return result;
405        }
406        if (n.getTypeArguments().isPresent()) {
407            result = n.getTypeArguments().get().accept(this, arg);
408            if (result != null)
409                return result;
410        }
411        {
412            result = n.getAnnotations().accept(this, arg);
413            if (result != null)
414                return result;
415        }
416        if (n.getComment().isPresent()) {
417            result = n.getComment().get().accept(this, arg);
418            if (result != null)
419                return result;
420        }
421        return null;
422    }
423
424    @Override
425    public R visit(final CompilationUnit nfinal A arg) {
426        R result;
427        {
428            result = n.getImports().accept(this, arg);
429            if (result != null)
430                return result;
431        }
432        if (n.getModule().isPresent()) {
433            result = n.getModule().get().accept(this, arg);
434            if (result != null)
435                return result;
436        }
437        if (n.getPackageDeclaration().isPresent()) {
438            result = n.getPackageDeclaration().get().accept(this, arg);
439            if (result != null)
440                return result;
441        }
442        {
443            result = n.getTypes().accept(this, arg);
444            if (result != null)
445                return result;
446        }
447        if (n.getComment().isPresent()) {
448            result = n.getComment().get().accept(this, arg);
449            if (result != null)
450                return result;
451        }
452        return null;
453    }
454
455    @Override
456    public R visit(final ConditionalExpr nfinal A arg) {
457        R result;
458        {
459            result = n.getCondition().accept(this, arg);
460            if (result != null)
461                return result;
462        }
463        {
464            result = n.getElseExpr().accept(this, arg);
465            if (result != null)
466                return result;
467        }
468        {
469            result = n.getThenExpr().accept(this, arg);
470            if (result != null)
471                return result;
472        }
473        if (n.getComment().isPresent()) {
474            result = n.getComment().get().accept(this, arg);
475            if (result != null)
476                return result;
477        }
478        return null;
479    }
480
481    @Override
482    public R visit(final ConstructorDeclaration nfinal A arg) {
483        R result;
484        {
485            result = n.getBody().accept(this, arg);
486            if (result != null)
487                return result;
488        }
489        {
490            result = n.getModifiers().accept(this, arg);
491            if (result != null)
492                return result;
493        }
494        {
495            result = n.getName().accept(this, arg);
496            if (result != null)
497                return result;
498        }
499        {
500            result = n.getParameters().accept(this, arg);
501            if (result != null)
502                return result;
503        }
504        if (n.getReceiverParameter().isPresent()) {
505            result = n.getReceiverParameter().get().accept(this, arg);
506            if (result != null)
507                return result;
508        }
509        {
510            result = n.getThrownExceptions().accept(this, arg);
511            if (result != null)
512                return result;
513        }
514        {
515            result = n.getTypeParameters().accept(this, arg);
516            if (result != null)
517                return result;
518        }
519        {
520            result = n.getAnnotations().accept(this, arg);
521            if (result != null)
522                return result;
523        }
524        if (n.getComment().isPresent()) {
525            result = n.getComment().get().accept(this, arg);
526            if (result != null)
527                return result;
528        }
529        return null;
530    }
531
532    @Override
533    public R visit(final ContinueStmt nfinal A arg) {
534        R result;
535        if (n.getLabel().isPresent()) {
536            result = n.getLabel().get().accept(this, arg);
537            if (result != null)
538                return result;
539        }
540        if (n.getComment().isPresent()) {
541            result = n.getComment().get().accept(this, arg);
542            if (result != null)
543                return result;
544        }
545        return null;
546    }
547
548    @Override
549    public R visit(final DoStmt nfinal A arg) {
550        R result;
551        {
552            result = n.getBody().accept(this, arg);
553            if (result != null)
554                return result;
555        }
556        {
557            result = n.getCondition().accept(this, arg);
558            if (result != null)
559                return result;
560        }
561        if (n.getComment().isPresent()) {
562            result = n.getComment().get().accept(this, arg);
563            if (result != null)
564                return result;
565        }
566        return null;
567    }
568
569    @Override
570    public R visit(final DoubleLiteralExpr nfinal A arg) {
571        R result;
572        if (n.getComment().isPresent()) {
573            result = n.getComment().get().accept(this, arg);
574            if (result != null)
575                return result;
576        }
577        return null;
578    }
579
580    @Override
581    public R visit(final EmptyStmt nfinal A arg) {
582        R result;
583        if (n.getComment().isPresent()) {
584            result = n.getComment().get().accept(this, arg);
585            if (result != null)
586                return result;
587        }
588        return null;
589    }
590
591    @Override
592    public R visit(final EnclosedExpr nfinal A arg) {
593        R result;
594        {
595            result = n.getInner().accept(this, arg);
596            if (result != null)
597                return result;
598        }
599        if (n.getComment().isPresent()) {
600            result = n.getComment().get().accept(this, arg);
601            if (result != null)
602                return result;
603        }
604        return null;
605    }
606
607    @Override
608    public R visit(final EnumConstantDeclaration nfinal A arg) {
609        R result;
610        {
611            result = n.getArguments().accept(this, arg);
612            if (result != null)
613                return result;
614        }
615        {
616            result = n.getClassBody().accept(this, arg);
617            if (result != null)
618                return result;
619        }
620        {
621            result = n.getName().accept(this, arg);
622            if (result != null)
623                return result;
624        }
625        {
626            result = n.getAnnotations().accept(this, arg);
627            if (result != null)
628                return result;
629        }
630        if (n.getComment().isPresent()) {
631            result = n.getComment().get().accept(this, arg);
632            if (result != null)
633                return result;
634        }
635        return null;
636    }
637
638    @Override
639    public R visit(final EnumDeclaration nfinal A arg) {
640        R result;
641        {
642            result = n.getEntries().accept(this, arg);
643            if (result != null)
644                return result;
645        }
646        {
647            result = n.getImplementedTypes().accept(this, arg);
648            if (result != null)
649                return result;
650        }
651        {
652            result = n.getMembers().accept(this, arg);
653            if (result != null)
654                return result;
655        }
656        {
657            result = n.getModifiers().accept(this, arg);
658            if (result != null)
659                return result;
660        }
661        {
662            result = n.getName().accept(this, arg);
663            if (result != null)
664                return result;
665        }
666        {
667            result = n.getAnnotations().accept(this, arg);
668            if (result != null)
669                return result;
670        }
671        if (n.getComment().isPresent()) {
672            result = n.getComment().get().accept(this, arg);
673            if (result != null)
674                return result;
675        }
676        return null;
677    }
678
679    @Override
680    public R visit(final ExplicitConstructorInvocationStmt nfinal A arg) {
681        R result;
682        {
683            result = n.getArguments().accept(this, arg);
684            if (result != null)
685                return result;
686        }
687        if (n.getExpression().isPresent()) {
688            result = n.getExpression().get().accept(this, arg);
689            if (result != null)
690                return result;
691        }
692        if (n.getTypeArguments().isPresent()) {
693            result = n.getTypeArguments().get().accept(this, arg);
694            if (result != null)
695                return result;
696        }
697        if (n.getComment().isPresent()) {
698            result = n.getComment().get().accept(this, arg);
699            if (result != null)
700                return result;
701        }
702        return null;
703    }
704
705    @Override
706    public R visit(final ExpressionStmt nfinal A arg) {
707        R result;
708        {
709            result = n.getExpression().accept(this, arg);
710            if (result != null)
711                return result;
712        }
713        if (n.getComment().isPresent()) {
714            result = n.getComment().get().accept(this, arg);
715            if (result != null)
716                return result;
717        }
718        return null;
719    }
720
721    @Override
722    public R visit(final FieldAccessExpr nfinal A arg) {
723        R result;
724        {
725            result = n.getName().accept(this, arg);
726            if (result != null)
727                return result;
728        }
729        {
730            result = n.getScope().accept(this, arg);
731            if (result != null)
732                return result;
733        }
734        if (n.getTypeArguments().isPresent()) {
735            result = n.getTypeArguments().get().accept(this, arg);
736            if (result != null)
737                return result;
738        }
739        if (n.getComment().isPresent()) {
740            result = n.getComment().get().accept(this, arg);
741            if (result != null)
742                return result;
743        }
744        return null;
745    }
746
747    @Override
748    public R visit(final FieldDeclaration nfinal A arg) {
749        R result;
750        {
751            result = n.getModifiers().accept(this, arg);
752            if (result != null)
753                return result;
754        }
755        {
756            result = n.getVariables().accept(this, arg);
757            if (result != null)
758                return result;
759        }
760        {
761            result = n.getAnnotations().accept(this, arg);
762            if (result != null)
763                return result;
764        }
765        if (n.getComment().isPresent()) {
766            result = n.getComment().get().accept(this, arg);
767            if (result != null)
768                return result;
769        }
770        return null;
771    }
772
773    @Override
774    public R visit(final ForEachStmt nfinal A arg) {
775        R result;
776        {
777            result = n.getBody().accept(this, arg);
778            if (result != null)
779                return result;
780        }
781        {
782            result = n.getIterable().accept(this, arg);
783            if (result != null)
784                return result;
785        }
786        {
787            result = n.getVariable().accept(this, arg);
788            if (result != null)
789                return result;
790        }
791        if (n.getComment().isPresent()) {
792            result = n.getComment().get().accept(this, arg);
793            if (result != null)
794                return result;
795        }
796        return null;
797    }
798
799    @Override
800    public R visit(final ForStmt nfinal A arg) {
801        R result;
802        {
803            result = n.getBody().accept(this, arg);
804            if (result != null)
805                return result;
806        }
807        if (n.getCompare().isPresent()) {
808            result = n.getCompare().get().accept(this, arg);
809            if (result != null)
810                return result;
811        }
812        {
813            result = n.getInitialization().accept(this, arg);
814            if (result != null)
815                return result;
816        }
817        {
818            result = n.getUpdate().accept(this, arg);
819            if (result != null)
820                return result;
821        }
822        if (n.getComment().isPresent()) {
823            result = n.getComment().get().accept(this, arg);
824            if (result != null)
825                return result;
826        }
827        return null;
828    }
829
830    @Override
831    public R visit(final IfStmt nfinal A arg) {
832        R result;
833        {
834            result = n.getCondition().accept(this, arg);
835            if (result != null)
836                return result;
837        }
838        if (n.getElseStmt().isPresent()) {
839            result = n.getElseStmt().get().accept(this, arg);
840            if (result != null)
841                return result;
842        }
843        {
844            result = n.getThenStmt().accept(this, arg);
845            if (result != null)
846                return result;
847        }
848        if (n.getComment().isPresent()) {
849            result = n.getComment().get().accept(this, arg);
850            if (result != null)
851                return result;
852        }
853        return null;
854    }
855
856    @Override
857    public R visit(final InitializerDeclaration nfinal A arg) {
858        R result;
859        {
860            result = n.getBody().accept(this, arg);
861            if (result != null)
862                return result;
863        }
864        {
865            result = n.getAnnotations().accept(this, arg);
866            if (result != null)
867                return result;
868        }
869        if (n.getComment().isPresent()) {
870            result = n.getComment().get().accept(this, arg);
871            if (result != null)
872                return result;
873        }
874        return null;
875    }
876
877    @Override
878    public R visit(final InstanceOfExpr nfinal A arg) {
879        R result;
880        {
881            result = n.getExpression().accept(this, arg);
882            if (result != null)
883                return result;
884        }
885        {
886            result = n.getType().accept(this, arg);
887            if (result != null)
888                return result;
889        }
890        if (n.getComment().isPresent()) {
891            result = n.getComment().get().accept(this, arg);
892            if (result != null)
893                return result;
894        }
895        return null;
896    }
897
898    @Override
899    public R visit(final IntegerLiteralExpr nfinal A arg) {
900        R result;
901        if (n.getComment().isPresent()) {
902            result = n.getComment().get().accept(this, arg);
903            if (result != null)
904                return result;
905        }
906        return null;
907    }
908
909    @Override
910    public R visit(final JavadocComment nfinal A arg) {
911        R result;
912        if (n.getComment().isPresent()) {
913            result = n.getComment().get().accept(this, arg);
914            if (result != null)
915                return result;
916        }
917        return null;
918    }
919
920    @Override
921    public R visit(final LabeledStmt nfinal A arg) {
922        R result;
923        {
924            result = n.getLabel().accept(this, arg);
925            if (result != null)
926                return result;
927        }
928        {
929            result = n.getStatement().accept(this, arg);
930            if (result != null)
931                return result;
932        }
933        if (n.getComment().isPresent()) {
934            result = n.getComment().get().accept(this, arg);
935            if (result != null)
936                return result;
937        }
938        return null;
939    }
940
941    @Override
942    public R visit(final LongLiteralExpr nfinal A arg) {
943        R result;
944        if (n.getComment().isPresent()) {
945            result = n.getComment().get().accept(this, arg);
946            if (result != null)
947                return result;
948        }
949        return null;
950    }
951
952    @Override
953    public R visit(final MarkerAnnotationExpr nfinal A arg) {
954        R result;
955        {
956            result = n.getName().accept(this, arg);
957            if (result != null)
958                return result;
959        }
960        if (n.getComment().isPresent()) {
961            result = n.getComment().get().accept(this, arg);
962            if (result != null)
963                return result;
964        }
965        return null;
966    }
967
968    @Override
969    public R visit(final MemberValuePair nfinal A arg) {
970        R result;
971        {
972            result = n.getName().accept(this, arg);
973            if (result != null)
974                return result;
975        }
976        {
977            result = n.getValue().accept(this, arg);
978            if (result != null)
979                return result;
980        }
981        if (n.getComment().isPresent()) {
982            result = n.getComment().get().accept(this, arg);
983            if (result != null)
984                return result;
985        }
986        return null;
987    }
988
989    @Override
990    public R visit(final MethodCallExpr nfinal A arg) {
991        R result;
992        {
993            result = n.getArguments().accept(this, arg);
994            if (result != null)
995                return result;
996        }
997        {
998            result = n.getName().accept(this, arg);
999            if (result != null)
1000                return result;
1001        }
1002        if (n.getScope().isPresent()) {
1003            result = n.getScope().get().accept(this, arg);
1004            if (result != null)
1005                return result;
1006        }
1007        if (n.getTypeArguments().isPresent()) {
1008            result = n.getTypeArguments().get().accept(this, arg);
1009            if (result != null)
1010                return result;
1011        }
1012        if (n.getComment().isPresent()) {
1013            result = n.getComment().get().accept(this, arg);
1014            if (result != null)
1015                return result;
1016        }
1017        return null;
1018    }
1019
1020    @Override
1021    public R visit(final MethodDeclaration nfinal A arg) {
1022        R result;
1023        if (n.getBody().isPresent()) {
1024            result = n.getBody().get().accept(this, arg);
1025            if (result != null)
1026                return result;
1027        }
1028        {
1029            result = n.getType().accept(this, arg);
1030            if (result != null)
1031                return result;
1032        }
1033        {
1034            result = n.getModifiers().accept(this, arg);
1035            if (result != null)
1036                return result;
1037        }
1038        {
1039            result = n.getName().accept(this, arg);
1040            if (result != null)
1041                return result;
1042        }
1043        {
1044            result = n.getParameters().accept(this, arg);
1045            if (result != null)
1046                return result;
1047        }
1048        if (n.getReceiverParameter().isPresent()) {
1049            result = n.getReceiverParameter().get().accept(this, arg);
1050            if (result != null)
1051                return result;
1052        }
1053        {
1054            result = n.getThrownExceptions().accept(this, arg);
1055            if (result != null)
1056                return result;
1057        }
1058        {
1059            result = n.getTypeParameters().accept(this, arg);
1060            if (result != null)
1061                return result;
1062        }
1063        {
1064            result = n.getAnnotations().accept(this, arg);
1065            if (result != null)
1066                return result;
1067        }
1068        if (n.getComment().isPresent()) {
1069            result = n.getComment().get().accept(this, arg);
1070            if (result != null)
1071                return result;
1072        }
1073        return null;
1074    }
1075
1076    @Override
1077    public R visit(final NameExpr nfinal A arg) {
1078        R result;
1079        {
1080            result = n.getName().accept(this, arg);
1081            if (result != null)
1082                return result;
1083        }
1084        if (n.getComment().isPresent()) {
1085            result = n.getComment().get().accept(this, arg);
1086            if (result != null)
1087                return result;
1088        }
1089        return null;
1090    }
1091
1092    @Override
1093    public R visit(final NormalAnnotationExpr nfinal A arg) {
1094        R result;
1095        {
1096            result = n.getPairs().accept(this, arg);
1097            if (result != null)
1098                return result;
1099        }
1100        {
1101            result = n.getName().accept(this, arg);
1102            if (result != null)
1103                return result;
1104        }
1105        if (n.getComment().isPresent()) {
1106            result = n.getComment().get().accept(this, arg);
1107            if (result != null)
1108                return result;
1109        }
1110        return null;
1111    }
1112
1113    @Override
1114    public R visit(final NullLiteralExpr nfinal A arg) {
1115        R result;
1116        if (n.getComment().isPresent()) {
1117            result = n.getComment().get().accept(this, arg);
1118            if (result != null)
1119                return result;
1120        }
1121        return null;
1122    }
1123
1124    @Override
1125    public R visit(final ObjectCreationExpr nfinal A arg) {
1126        R result;
1127        if (n.getAnonymousClassBody().isPresent()) {
1128            result = n.getAnonymousClassBody().get().accept(this, arg);
1129            if (result != null)
1130                return result;
1131        }
1132        {
1133            result = n.getArguments().accept(this, arg);
1134            if (result != null)
1135                return result;
1136        }
1137        if (n.getScope().isPresent()) {
1138            result = n.getScope().get().accept(this, arg);
1139            if (result != null)
1140                return result;
1141        }
1142        {
1143            result = n.getType().accept(this, arg);
1144            if (result != null)
1145                return result;
1146        }
1147        if (n.getTypeArguments().isPresent()) {
1148            result = n.getTypeArguments().get().accept(this, arg);
1149            if (result != null)
1150                return result;
1151        }
1152        if (n.getComment().isPresent()) {
1153            result = n.getComment().get().accept(this, arg);
1154            if (result != null)
1155                return result;
1156        }
1157        return null;
1158    }
1159
1160    @Override
1161    public R visit(final PackageDeclaration nfinal A arg) {
1162        R result;
1163        {
1164            result = n.getAnnotations().accept(this, arg);
1165            if (result != null)
1166                return result;
1167        }
1168        {
1169            result = n.getName().accept(this, arg);
1170            if (result != null)
1171                return result;
1172        }
1173        if (n.getComment().isPresent()) {
1174            result = n.getComment().get().accept(this, arg);
1175            if (result != null)
1176                return result;
1177        }
1178        return null;
1179    }
1180
1181    @Override
1182    public R visit(final Parameter nfinal A arg) {
1183        R result;
1184        {
1185            result = n.getAnnotations().accept(this, arg);
1186            if (result != null)
1187                return result;
1188        }
1189        {
1190            result = n.getModifiers().accept(this, arg);
1191            if (result != null)
1192                return result;
1193        }
1194        {
1195            result = n.getName().accept(this, arg);
1196            if (result != null)
1197                return result;
1198        }
1199        {
1200            result = n.getType().accept(this, arg);
1201            if (result != null)
1202                return result;
1203        }
1204        {
1205            result = n.getVarArgsAnnotations().accept(this, arg);
1206            if (result != null)
1207                return result;
1208        }
1209        if (n.getComment().isPresent()) {
1210            result = n.getComment().get().accept(this, arg);
1211            if (result != null)
1212                return result;
1213        }
1214        return null;
1215    }
1216
1217    @Override
1218    public R visit(final PrimitiveType nfinal A arg) {
1219        R result;
1220        {
1221            result = n.getAnnotations().accept(this, arg);
1222            if (result != null)
1223                return result;
1224        }
1225        if (n.getComment().isPresent()) {
1226            result = n.getComment().get().accept(this, arg);
1227            if (result != null)
1228                return result;
1229        }
1230        return null;
1231    }
1232
1233    @Override
1234    public R visit(final Name nfinal A arg) {
1235        R result;
1236        if (n.getQualifier().isPresent()) {
1237            result = n.getQualifier().get().accept(this, arg);
1238            if (result != null)
1239                return result;
1240        }
1241        if (n.getComment().isPresent()) {
1242            result = n.getComment().get().accept(this, arg);
1243            if (result != null)
1244                return result;
1245        }
1246        return null;
1247    }
1248
1249    @Override
1250    public R visit(final SimpleName nfinal A arg) {
1251        R result;
1252        if (n.getComment().isPresent()) {
1253            result = n.getComment().get().accept(this, arg);
1254            if (result != null)
1255                return result;
1256        }
1257        return null;
1258    }
1259
1260    @Override
1261    public R visit(final ArrayType nfinal A arg) {
1262        R result;
1263        {
1264            result = n.getComponentType().accept(this, arg);
1265            if (result != null)
1266                return result;
1267        }
1268        {
1269            result = n.getAnnotations().accept(this, arg);
1270            if (result != null)
1271                return result;
1272        }
1273        if (n.getComment().isPresent()) {
1274            result = n.getComment().get().accept(this, arg);
1275            if (result != null)
1276                return result;
1277        }
1278        return null;
1279    }
1280
1281    @Override
1282    public R visit(final ArrayCreationLevel nfinal A arg) {
1283        R result;
1284        {
1285            result = n.getAnnotations().accept(this, arg);
1286            if (result != null)
1287                return result;
1288        }
1289        if (n.getDimension().isPresent()) {
1290            result = n.getDimension().get().accept(this, arg);
1291            if (result != null)
1292                return result;
1293        }
1294        if (n.getComment().isPresent()) {
1295            result = n.getComment().get().accept(this, arg);
1296            if (result != null)
1297                return result;
1298        }
1299        return null;
1300    }
1301
1302    @Override
1303    public R visit(final IntersectionType nfinal A arg) {
1304        R result;
1305        {
1306            result = n.getElements().accept(this, arg);
1307            if (result != null)
1308                return result;
1309        }
1310        {
1311            result = n.getAnnotations().accept(this, arg);
1312            if (result != null)
1313                return result;
1314        }
1315        if (n.getComment().isPresent()) {
1316            result = n.getComment().get().accept(this, arg);
1317            if (result != null)
1318                return result;
1319        }
1320        return null;
1321    }
1322
1323    @Override
1324    public R visit(final UnionType nfinal A arg) {
1325        R result;
1326        {
1327            result = n.getElements().accept(this, arg);
1328            if (result != null)
1329                return result;
1330        }
1331        {
1332            result = n.getAnnotations().accept(this, arg);
1333            if (result != null)
1334                return result;
1335        }
1336        if (n.getComment().isPresent()) {
1337            result = n.getComment().get().accept(this, arg);
1338            if (result != null)
1339                return result;
1340        }
1341        return null;
1342    }
1343
1344    @Override
1345    public R visit(final ReturnStmt nfinal A arg) {
1346        R result;
1347        if (n.getExpression().isPresent()) {
1348            result = n.getExpression().get().accept(this, arg);
1349            if (result != null)
1350                return result;
1351        }
1352        if (n.getComment().isPresent()) {
1353            result = n.getComment().get().accept(this, arg);
1354            if (result != null)
1355                return result;
1356        }
1357        return null;
1358    }
1359
1360    @Override
1361    public R visit(final SingleMemberAnnotationExpr nfinal A arg) {
1362        R result;
1363        {
1364            result = n.getMemberValue().accept(this, arg);
1365            if (result != null)
1366                return result;
1367        }
1368        {
1369            result = n.getName().accept(this, arg);
1370            if (result != null)
1371                return result;
1372        }
1373        if (n.getComment().isPresent()) {
1374            result = n.getComment().get().accept(this, arg);
1375            if (result != null)
1376                return result;
1377        }
1378        return null;
1379    }
1380
1381    @Override
1382    public R visit(final StringLiteralExpr nfinal A arg) {
1383        R result;
1384        if (n.getComment().isPresent()) {
1385            result = n.getComment().get().accept(this, arg);
1386            if (result != null)
1387                return result;
1388        }
1389        return null;
1390    }
1391
1392    @Override
1393    public R visit(final SuperExpr nfinal A arg) {
1394        R result;
1395        if (n.getTypeName().isPresent()) {
1396            result = n.getTypeName().get().accept(this, arg);
1397            if (result != null)
1398                return result;
1399        }
1400        if (n.getComment().isPresent()) {
1401            result = n.getComment().get().accept(this, arg);
1402            if (result != null)
1403                return result;
1404        }
1405        return null;
1406    }
1407
1408    @Override
1409    public R visit(final SwitchEntry nfinal A arg) {
1410        R result;
1411        {
1412            result = n.getLabels().accept(this, arg);
1413            if (result != null)
1414                return result;
1415        }
1416        {
1417            result = n.getStatements().accept(this, arg);
1418            if (result != null)
1419                return result;
1420        }
1421        if (n.getComment().isPresent()) {
1422            result = n.getComment().get().accept(this, arg);
1423            if (result != null)
1424                return result;
1425        }
1426        return null;
1427    }
1428
1429    @Override
1430    public R visit(final SwitchStmt nfinal A arg) {
1431        R result;
1432        {
1433            result = n.getEntries().accept(this, arg);
1434            if (result != null)
1435                return result;
1436        }
1437        {
1438            result = n.getSelector().accept(this, arg);
1439            if (result != null)
1440                return result;
1441        }
1442        if (n.getComment().isPresent()) {
1443            result = n.getComment().get().accept(this, arg);
1444            if (result != null)
1445                return result;
1446        }
1447        return null;
1448    }
1449
1450    @Override
1451    public R visit(final SynchronizedStmt nfinal A arg) {
1452        R result;
1453        {
1454            result = n.getBody().accept(this, arg);
1455            if (result != null)
1456                return result;
1457        }
1458        {
1459            result = n.getExpression().accept(this, arg);
1460            if (result != null)
1461                return result;
1462        }
1463        if (n.getComment().isPresent()) {
1464            result = n.getComment().get().accept(this, arg);
1465            if (result != null)
1466                return result;
1467        }
1468        return null;
1469    }
1470
1471    @Override
1472    public R visit(final ThisExpr nfinal A arg) {
1473        R result;
1474        if (n.getTypeName().isPresent()) {
1475            result = n.getTypeName().get().accept(this, arg);
1476            if (result != null)
1477                return result;
1478        }
1479        if (n.getComment().isPresent()) {
1480            result = n.getComment().get().accept(this, arg);
1481            if (result != null)
1482                return result;
1483        }
1484        return null;
1485    }
1486
1487    @Override
1488    public R visit(final ThrowStmt nfinal A arg) {
1489        R result;
1490        {
1491            result = n.getExpression().accept(this, arg);
1492            if (result != null)
1493                return result;
1494        }
1495        if (n.getComment().isPresent()) {
1496            result = n.getComment().get().accept(this, arg);
1497            if (result != null)
1498                return result;
1499        }
1500        return null;
1501    }
1502
1503    @Override
1504    public R visit(final TryStmt nfinal A arg) {
1505        R result;
1506        {
1507            result = n.getCatchClauses().accept(this, arg);
1508            if (result != null)
1509                return result;
1510        }
1511        if (n.getFinallyBlock().isPresent()) {
1512            result = n.getFinallyBlock().get().accept(this, arg);
1513            if (result != null)
1514                return result;
1515        }
1516        {
1517            result = n.getResources().accept(this, arg);
1518            if (result != null)
1519                return result;
1520        }
1521        {
1522            result = n.getTryBlock().accept(this, arg);
1523            if (result != null)
1524                return result;
1525        }
1526        if (n.getComment().isPresent()) {
1527            result = n.getComment().get().accept(this, arg);
1528            if (result != null)
1529                return result;
1530        }
1531        return null;
1532    }
1533
1534    @Override
1535    public R visit(final LocalClassDeclarationStmt nfinal A arg) {
1536        R result;
1537        {
1538            result = n.getClassDeclaration().accept(this, arg);
1539            if (result != null)
1540                return result;
1541        }
1542        if (n.getComment().isPresent()) {
1543            result = n.getComment().get().accept(this, arg);
1544            if (result != null)
1545                return result;
1546        }
1547        return null;
1548    }
1549
1550    @Override
1551    public R visit(final TypeParameter nfinal A arg) {
1552        R result;
1553        {
1554            result = n.getName().accept(this, arg);
1555            if (result != null)
1556                return result;
1557        }
1558        {
1559            result = n.getTypeBound().accept(this, arg);
1560            if (result != null)
1561                return result;
1562        }
1563        {
1564            result = n.getAnnotations().accept(this, arg);
1565            if (result != null)
1566                return result;
1567        }
1568        if (n.getComment().isPresent()) {
1569            result = n.getComment().get().accept(this, arg);
1570            if (result != null)
1571                return result;
1572        }
1573        return null;
1574    }
1575
1576    @Override
1577    public R visit(final UnaryExpr nfinal A arg) {
1578        R result;
1579        {
1580            result = n.getExpression().accept(this, arg);
1581            if (result != null)
1582                return result;
1583        }
1584        if (n.getComment().isPresent()) {
1585            result = n.getComment().get().accept(this, arg);
1586            if (result != null)
1587                return result;
1588        }
1589        return null;
1590    }
1591
1592    @Override
1593    public R visit(final UnknownType nfinal A arg) {
1594        R result;
1595        {
1596            result = n.getAnnotations().accept(this, arg);
1597            if (result != null)
1598                return result;
1599        }
1600        if (n.getComment().isPresent()) {
1601            result = n.getComment().get().accept(this, arg);
1602            if (result != null)
1603                return result;
1604        }
1605        return null;
1606    }
1607
1608    @Override
1609    public R visit(final VariableDeclarationExpr nfinal A arg) {
1610        R result;
1611        {
1612            result = n.getAnnotations().accept(this, arg);
1613            if (result != null)
1614                return result;
1615        }
1616        {
1617            result = n.getModifiers().accept(this, arg);
1618            if (result != null)
1619                return result;
1620        }
1621        {
1622            result = n.getVariables().accept(this, arg);
1623            if (result != null)
1624                return result;
1625        }
1626        if (n.getComment().isPresent()) {
1627            result = n.getComment().get().accept(this, arg);
1628            if (result != null)
1629                return result;
1630        }
1631        return null;
1632    }
1633
1634    @Override
1635    public R visit(final VariableDeclarator nfinal A arg) {
1636        R result;
1637        if (n.getInitializer().isPresent()) {
1638            result = n.getInitializer().get().accept(this, arg);
1639            if (result != null)
1640                return result;
1641        }
1642        {
1643            result = n.getName().accept(this, arg);
1644            if (result != null)
1645                return result;
1646        }
1647        {
1648            result = n.getType().accept(this, arg);
1649            if (result != null)
1650                return result;
1651        }
1652        if (n.getComment().isPresent()) {
1653            result = n.getComment().get().accept(this, arg);
1654            if (result != null)
1655                return result;
1656        }
1657        return null;
1658    }
1659
1660    @Override
1661    public R visit(final VoidType nfinal A arg) {
1662        R result;
1663        {
1664            result = n.getAnnotations().accept(this, arg);
1665            if (result != null)
1666                return result;
1667        }
1668        if (n.getComment().isPresent()) {
1669            result = n.getComment().get().accept(this, arg);
1670            if (result != null)
1671                return result;
1672        }
1673        return null;
1674    }
1675
1676    @Override
1677    public R visit(final WhileStmt nfinal A arg) {
1678        R result;
1679        {
1680            result = n.getBody().accept(this, arg);
1681            if (result != null)
1682                return result;
1683        }
1684        {
1685            result = n.getCondition().accept(this, arg);
1686            if (result != null)
1687                return result;
1688        }
1689        if (n.getComment().isPresent()) {
1690            result = n.getComment().get().accept(this, arg);
1691            if (result != null)
1692                return result;
1693        }
1694        return null;
1695    }
1696
1697    @Override
1698    public R visit(final WildcardType nfinal A arg) {
1699        R result;
1700        if (n.getExtendedType().isPresent()) {
1701            result = n.getExtendedType().get().accept(this, arg);
1702            if (result != null)
1703                return result;
1704        }
1705        if (n.getSuperType().isPresent()) {
1706            result = n.getSuperType().get().accept(this, arg);
1707            if (result != null)
1708                return result;
1709        }
1710        {
1711            result = n.getAnnotations().accept(this, arg);
1712            if (result != null)
1713                return result;
1714        }
1715        if (n.getComment().isPresent()) {
1716            result = n.getComment().get().accept(this, arg);
1717            if (result != null)
1718                return result;
1719        }
1720        return null;
1721    }
1722
1723    @Override
1724    public R visit(final LambdaExpr nfinal A arg) {
1725        R result;
1726        {
1727            result = n.getBody().accept(this, arg);
1728            if (result != null)
1729                return result;
1730        }
1731        {
1732            result = n.getParameters().accept(this, arg);
1733            if (result != null)
1734                return result;
1735        }
1736        if (n.getComment().isPresent()) {
1737            result = n.getComment().get().accept(this, arg);
1738            if (result != null)
1739                return result;
1740        }
1741        return null;
1742    }
1743
1744    @Override
1745    public R visit(final MethodReferenceExpr nfinal A arg) {
1746        R result;
1747        {
1748            result = n.getScope().accept(this, arg);
1749            if (result != null)
1750                return result;
1751        }
1752        if (n.getTypeArguments().isPresent()) {
1753            result = n.getTypeArguments().get().accept(this, arg);
1754            if (result != null)
1755                return result;
1756        }
1757        if (n.getComment().isPresent()) {
1758            result = n.getComment().get().accept(this, arg);
1759            if (result != null)
1760                return result;
1761        }
1762        return null;
1763    }
1764
1765    @Override
1766    public R visit(final TypeExpr nfinal A arg) {
1767        R result;
1768        {
1769            result = n.getType().accept(this, arg);
1770            if (result != null)
1771                return result;
1772        }
1773        if (n.getComment().isPresent()) {
1774            result = n.getComment().get().accept(this, arg);
1775            if (result != null)
1776                return result;
1777        }
1778        return null;
1779    }
1780
1781    @Override
1782    public R visit(final ImportDeclaration nfinal A arg) {
1783        R result;
1784        {
1785            result = n.getName().accept(this, arg);
1786            if (result != null)
1787                return result;
1788        }
1789        if (n.getComment().isPresent()) {
1790            result = n.getComment().get().accept(this, arg);
1791            if (result != null)
1792                return result;
1793        }
1794        return null;
1795    }
1796
1797    @Override
1798    public R visit(final BlockComment nfinal A arg) {
1799        R result;
1800        if (n.getComment().isPresent()) {
1801            result = n.getComment().get().accept(this, arg);
1802            if (result != null)
1803                return result;
1804        }
1805        return null;
1806    }
1807
1808    @Override
1809    public R visit(final LineComment nfinal A arg) {
1810        R result;
1811        if (n.getComment().isPresent()) {
1812            result = n.getComment().get().accept(this, arg);
1813            if (result != null)
1814                return result;
1815        }
1816        return null;
1817    }
1818
1819    @Override
1820    public R visit(NodeList nA arg) {
1821        for (final Object v : n) {
1822            R result = ((Nodev).accept(this, arg);
1823            if (result != null) {
1824                return result;
1825            }
1826        }
1827        return null;
1828    }
1829
1830    @Override
1831    public R visit(final ModuleDeclaration nfinal A arg) {
1832        R result;
1833        {
1834            result = n.getAnnotations().accept(this, arg);
1835            if (result != null)
1836                return result;
1837        }
1838        {
1839            result = n.getDirectives().accept(this, arg);
1840            if (result != null)
1841                return result;
1842        }
1843        {
1844            result = n.getName().accept(this, arg);
1845            if (result != null)
1846                return result;
1847        }
1848        if (n.getComment().isPresent()) {
1849            result = n.getComment().get().accept(this, arg);
1850            if (result != null)
1851                return result;
1852        }
1853        return null;
1854    }
1855
1856    @Override
1857    public R visit(final ModuleRequiresDirective nfinal A arg) {
1858        R result;
1859        {
1860            result = n.getModifiers().accept(this, arg);
1861            if (result != null)
1862                return result;
1863        }
1864        {
1865            result = n.getName().accept(this, arg);
1866            if (result != null)
1867                return result;
1868        }
1869        if (n.getComment().isPresent()) {
1870            result = n.getComment().get().accept(this, arg);
1871            if (result != null)
1872                return result;
1873        }
1874        return null;
1875    }
1876
1877    @Override()
1878    public R visit(final ModuleExportsDirective nfinal A arg) {
1879        R result;
1880        {
1881            result = n.getModuleNames().accept(this, arg);
1882            if (result != null)
1883                return result;
1884        }
1885        {
1886            result = n.getName().accept(this, arg);
1887            if (result != null)
1888                return result;
1889        }
1890        if (n.getComment().isPresent()) {
1891            result = n.getComment().get().accept(this, arg);
1892            if (result != null)
1893                return result;
1894        }
1895        return null;
1896    }
1897
1898    @Override()
1899    public R visit(final ModuleProvidesDirective nfinal A arg) {
1900        R result;
1901        {
1902            result = n.getName().accept(this, arg);
1903            if (result != null)
1904                return result;
1905        }
1906        {
1907            result = n.getWith().accept(this, arg);
1908            if (result != null)
1909                return result;
1910        }
1911        if (n.getComment().isPresent()) {
1912            result = n.getComment().get().accept(this, arg);
1913            if (result != null)
1914                return result;
1915        }
1916        return null;
1917    }
1918
1919    @Override()
1920    public R visit(final ModuleUsesDirective nfinal A arg) {
1921        R result;
1922        {
1923            result = n.getName().accept(this, arg);
1924            if (result != null)
1925                return result;
1926        }
1927        if (n.getComment().isPresent()) {
1928            result = n.getComment().get().accept(this, arg);
1929            if (result != null)
1930                return result;
1931        }
1932        return null;
1933    }
1934
1935    @Override
1936    public R visit(final ModuleOpensDirective nfinal A arg) {
1937        R result;
1938        {
1939            result = n.getModuleNames().accept(this, arg);
1940            if (result != null)
1941                return result;
1942        }
1943        {
1944            result = n.getName().accept(this, arg);
1945            if (result != null)
1946                return result;
1947        }
1948        if (n.getComment().isPresent()) {
1949            result = n.getComment().get().accept(this, arg);
1950            if (result != null)
1951                return result;
1952        }
1953        return null;
1954    }
1955
1956    @Override
1957    public R visit(final UnparsableStmt nfinal A arg) {
1958        R result;
1959        if (n.getComment().isPresent()) {
1960            result = n.getComment().get().accept(this, arg);
1961            if (result != null)
1962                return result;
1963        }
1964        return null;
1965    }
1966
1967    @Override
1968    public R visit(final ReceiverParameter nfinal A arg) {
1969        R result;
1970        {
1971            result = n.getAnnotations().accept(this, arg);
1972            if (result != null)
1973                return result;
1974        }
1975        {
1976            result = n.getName().accept(this, arg);
1977            if (result != null)
1978                return result;
1979        }
1980        {
1981            result = n.getType().accept(this, arg);
1982            if (result != null)
1983                return result;
1984        }
1985        if (n.getComment().isPresent()) {
1986            result = n.getComment().get().accept(this, arg);
1987            if (result != null)
1988                return result;
1989        }
1990        return null;
1991    }
1992
1993    @Override
1994    public R visit(final VarType nfinal A arg) {
1995        R result;
1996        {
1997            result = n.getAnnotations().accept(this, arg);
1998            if (result != null)
1999                return result;
2000        }
2001        if (n.getComment().isPresent()) {
2002            result = n.getComment().get().accept(this, arg);
2003            if (result != null)
2004                return result;
2005        }
2006        return null;
2007    }
2008
2009    @Override
2010    public R visit(final Modifier nfinal A arg) {
2011        R result;
2012        if (n.getComment().isPresent()) {
2013            result = n.getComment().get().accept(this, arg);
2014            if (result != null)
2015                return result;
2016        }
2017        return null;
2018    }
2019
2020    @Override
2021    public R visit(final SwitchExpr nfinal A arg) {
2022        R result;
2023        {
2024            result = n.getEntries().accept(this, arg);
2025            if (result != null)
2026                return result;
2027        }
2028        {
2029            result = n.getSelector().accept(this, arg);
2030            if (result != null)
2031                return result;
2032        }
2033        if (n.getComment().isPresent()) {
2034            result = n.getComment().get().accept(this, arg);
2035            if (result != null)
2036                return result;
2037        }
2038        return null;
2039    }
2040
2041    @Override
2042    public R visit(final YieldStmt nfinal A arg) {
2043        R result;
2044        {
2045            result = n.getExpression().accept(this, arg);
2046            if (result != null)
2047                return result;
2048        }
2049        if (n.getComment().isPresent()) {
2050            result = n.getComment().get().accept(this, arg);
2051            if (result != null)
2052                return result;
2053        }
2054        return null;
2055    }
2056
2057    @Override
2058    public R visit(final TextBlockLiteralExpr nfinal A arg) {
2059        R result;
2060        if (n.getComment().isPresent()) {
2061            result = n.getComment().get().accept(this, arg);
2062            if (result != null)
2063                return result;
2064        }
2065        return null;
2066    }
2067}
2068
MembersX
GenericVisitorAdapter:visit:Block:Block:result
GenericVisitorAdapter:visit
GenericVisitorAdapter:visit:Block:result
Members
X