JavaParser Source Viewer

Home|JavaParser/com/github/javaparser/ast/visitor/VoidVisitorAdapter.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 returns nothing, and has a default implementation for all its visit
35 * methods that simply visit their children in an unspecified order.
36 *
37 * @author Julio Vilmar Gesser
38 */
39public abstract class VoidVisitorAdapter<A> implements VoidVisitor<A> {
40
41    @Override
42    public void visit(final AnnotationDeclaration nfinal A arg) {
43        n.getMembers().forEach(p -> p.accept(this, arg));
44        n.getModifiers().forEach(p -> p.accept(this, arg));
45        n.getName().accept(this, arg);
46        n.getAnnotations().forEach(p -> p.accept(this, arg));
47        n.getComment().ifPresent(l -> l.accept(this, arg));
48    }
49
50    @Override
51    public void visit(final AnnotationMemberDeclaration nfinal A arg) {
52        n.getDefaultValue().ifPresent(l -> l.accept(this, arg));
53        n.getModifiers().forEach(p -> p.accept(this, arg));
54        n.getName().accept(this, arg);
55        n.getType().accept(this, arg);
56        n.getAnnotations().forEach(p -> p.accept(this, arg));
57        n.getComment().ifPresent(l -> l.accept(this, arg));
58    }
59
60    @Override
61    public void visit(final ArrayAccessExpr nfinal A arg) {
62        n.getIndex().accept(this, arg);
63        n.getName().accept(this, arg);
64        n.getComment().ifPresent(l -> l.accept(this, arg));
65    }
66
67    @Override
68    public void visit(final ArrayCreationExpr nfinal A arg) {
69        n.getElementType().accept(this, arg);
70        n.getInitializer().ifPresent(l -> l.accept(this, arg));
71        n.getLevels().forEach(p -> p.accept(this, arg));
72        n.getComment().ifPresent(l -> l.accept(this, arg));
73    }
74
75    @Override
76    public void visit(final ArrayInitializerExpr nfinal A arg) {
77        n.getValues().forEach(p -> p.accept(this, arg));
78        n.getComment().ifPresent(l -> l.accept(this, arg));
79    }
80
81    @Override
82    public void visit(final AssertStmt nfinal A arg) {
83        n.getCheck().accept(this, arg);
84        n.getMessage().ifPresent(l -> l.accept(this, arg));
85        n.getComment().ifPresent(l -> l.accept(this, arg));
86    }
87
88    @Override
89    public void visit(final AssignExpr nfinal A arg) {
90        n.getTarget().accept(this, arg);
91        n.getValue().accept(this, arg);
92        n.getComment().ifPresent(l -> l.accept(this, arg));
93    }
94
95    @Override
96    public void visit(final BinaryExpr nfinal A arg) {
97        n.getLeft().accept(this, arg);
98        n.getRight().accept(this, arg);
99        n.getComment().ifPresent(l -> l.accept(this, arg));
100    }
101
102    @Override
103    public void visit(final BlockComment nfinal A arg) {
104        n.getComment().ifPresent(l -> l.accept(this, arg));
105    }
106
107    @Override
108    public void visit(final BlockStmt nfinal A arg) {
109        n.getStatements().forEach(p -> p.accept(this, arg));
110        n.getComment().ifPresent(l -> l.accept(this, arg));
111    }
112
113    @Override
114    public void visit(final BooleanLiteralExpr nfinal A arg) {
115        n.getComment().ifPresent(l -> l.accept(this, arg));
116    }
117
118    @Override
119    public void visit(final BreakStmt nfinal A arg) {
120        n.getLabel().ifPresent(l -> l.accept(this, arg));
121        n.getComment().ifPresent(l -> l.accept(this, arg));
122    }
123
124    @Override
125    public void visit(final CastExpr nfinal A arg) {
126        n.getExpression().accept(this, arg);
127        n.getType().accept(this, arg);
128        n.getComment().ifPresent(l -> l.accept(this, arg));
129    }
130
131    @Override
132    public void visit(final CatchClause nfinal A arg) {
133        n.getBody().accept(this, arg);
134        n.getParameter().accept(this, arg);
135        n.getComment().ifPresent(l -> l.accept(this, arg));
136    }
137
138    @Override
139    public void visit(final CharLiteralExpr nfinal A arg) {
140        n.getComment().ifPresent(l -> l.accept(this, arg));
141    }
142
143    @Override
144    public void visit(final ClassExpr nfinal A arg) {
145        n.getType().accept(this, arg);
146        n.getComment().ifPresent(l -> l.accept(this, arg));
147    }
148
149    @Override
150    public void visit(final ClassOrInterfaceDeclaration nfinal A arg) {
151        n.getExtendedTypes().forEach(p -> p.accept(this, arg));
152        n.getImplementedTypes().forEach(p -> p.accept(this, arg));
153        n.getTypeParameters().forEach(p -> p.accept(this, arg));
154        n.getMembers().forEach(p -> p.accept(this, arg));
155        n.getModifiers().forEach(p -> p.accept(this, arg));
156        n.getName().accept(this, arg);
157        n.getAnnotations().forEach(p -> p.accept(this, arg));
158        n.getComment().ifPresent(l -> l.accept(this, arg));
159    }
160
161    @Override
162    public void visit(final ClassOrInterfaceType nfinal A arg) {
163        n.getName().accept(this, arg);
164        n.getScope().ifPresent(l -> l.accept(this, arg));
165        n.getTypeArguments().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
166        n.getAnnotations().forEach(p -> p.accept(this, arg));
167        n.getComment().ifPresent(l -> l.accept(this, arg));
168    }
169
170    @Override
171    public void visit(final CompilationUnit nfinal A arg) {
172        n.getImports().forEach(p -> p.accept(this, arg));
173        n.getModule().ifPresent(l -> l.accept(this, arg));
174        n.getPackageDeclaration().ifPresent(l -> l.accept(this, arg));
175        n.getTypes().forEach(p -> p.accept(this, arg));
176        n.getComment().ifPresent(l -> l.accept(this, arg));
177    }
178
179    @Override
180    public void visit(final ConditionalExpr nfinal A arg) {
181        n.getCondition().accept(this, arg);
182        n.getElseExpr().accept(this, arg);
183        n.getThenExpr().accept(this, arg);
184        n.getComment().ifPresent(l -> l.accept(this, arg));
185    }
186
187    @Override
188    public void visit(final ConstructorDeclaration nfinal A arg) {
189        n.getBody().accept(this, arg);
190        n.getModifiers().forEach(p -> p.accept(this, arg));
191        n.getName().accept(this, arg);
192        n.getParameters().forEach(p -> p.accept(this, arg));
193        n.getReceiverParameter().ifPresent(l -> l.accept(this, arg));
194        n.getThrownExceptions().forEach(p -> p.accept(this, arg));
195        n.getTypeParameters().forEach(p -> p.accept(this, arg));
196        n.getAnnotations().forEach(p -> p.accept(this, arg));
197        n.getComment().ifPresent(l -> l.accept(this, arg));
198    }
199
200    @Override
201    public void visit(final ContinueStmt nfinal A arg) {
202        n.getLabel().ifPresent(l -> l.accept(this, arg));
203        n.getComment().ifPresent(l -> l.accept(this, arg));
204    }
205
206    @Override
207    public void visit(final DoStmt nfinal A arg) {
208        n.getBody().accept(this, arg);
209        n.getCondition().accept(this, arg);
210        n.getComment().ifPresent(l -> l.accept(this, arg));
211    }
212
213    @Override
214    public void visit(final DoubleLiteralExpr nfinal A arg) {
215        n.getComment().ifPresent(l -> l.accept(this, arg));
216    }
217
218    @Override
219    public void visit(final EmptyStmt nfinal A arg) {
220        n.getComment().ifPresent(l -> l.accept(this, arg));
221    }
222
223    @Override
224    public void visit(final EnclosedExpr nfinal A arg) {
225        n.getInner().accept(this, arg);
226        n.getComment().ifPresent(l -> l.accept(this, arg));
227    }
228
229    @Override
230    public void visit(final EnumConstantDeclaration nfinal A arg) {
231        n.getArguments().forEach(p -> p.accept(this, arg));
232        n.getClassBody().forEach(p -> p.accept(this, arg));
233        n.getName().accept(this, arg);
234        n.getAnnotations().forEach(p -> p.accept(this, arg));
235        n.getComment().ifPresent(l -> l.accept(this, arg));
236    }
237
238    @Override
239    public void visit(final EnumDeclaration nfinal A arg) {
240        n.getEntries().forEach(p -> p.accept(this, arg));
241        n.getImplementedTypes().forEach(p -> p.accept(this, arg));
242        n.getMembers().forEach(p -> p.accept(this, arg));
243        n.getModifiers().forEach(p -> p.accept(this, arg));
244        n.getName().accept(this, arg);
245        n.getAnnotations().forEach(p -> p.accept(this, arg));
246        n.getComment().ifPresent(l -> l.accept(this, arg));
247    }
248
249    @Override
250    public void visit(final ExplicitConstructorInvocationStmt nfinal A arg) {
251        n.getArguments().forEach(p -> p.accept(this, arg));
252        n.getExpression().ifPresent(l -> l.accept(this, arg));
253        n.getTypeArguments().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
254        n.getComment().ifPresent(l -> l.accept(this, arg));
255    }
256
257    @Override
258    public void visit(final ExpressionStmt nfinal A arg) {
259        n.getExpression().accept(this, arg);
260        n.getComment().ifPresent(l -> l.accept(this, arg));
261    }
262
263    @Override
264    public void visit(final FieldAccessExpr nfinal A arg) {
265        n.getName().accept(this, arg);
266        n.getScope().accept(this, arg);
267        n.getTypeArguments().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
268        n.getComment().ifPresent(l -> l.accept(this, arg));
269    }
270
271    @Override
272    public void visit(final FieldDeclaration nfinal A arg) {
273        n.getModifiers().forEach(p -> p.accept(this, arg));
274        n.getVariables().forEach(p -> p.accept(this, arg));
275        n.getAnnotations().forEach(p -> p.accept(this, arg));
276        n.getComment().ifPresent(l -> l.accept(this, arg));
277    }
278
279    @Override
280    public void visit(final ForEachStmt nfinal A arg) {
281        n.getBody().accept(this, arg);
282        n.getIterable().accept(this, arg);
283        n.getVariable().accept(this, arg);
284        n.getComment().ifPresent(l -> l.accept(this, arg));
285    }
286
287    @Override
288    public void visit(final ForStmt nfinal A arg) {
289        n.getBody().accept(this, arg);
290        n.getCompare().ifPresent(l -> l.accept(this, arg));
291        n.getInitialization().forEach(p -> p.accept(this, arg));
292        n.getUpdate().forEach(p -> p.accept(this, arg));
293        n.getComment().ifPresent(l -> l.accept(this, arg));
294    }
295
296    @Override
297    public void visit(final IfStmt nfinal A arg) {
298        n.getCondition().accept(this, arg);
299        n.getElseStmt().ifPresent(l -> l.accept(this, arg));
300        n.getThenStmt().accept(this, arg);
301        n.getComment().ifPresent(l -> l.accept(this, arg));
302    }
303
304    @Override
305    public void visit(final InitializerDeclaration nfinal A arg) {
306        n.getBody().accept(this, arg);
307        n.getAnnotations().forEach(p -> p.accept(this, arg));
308        n.getComment().ifPresent(l -> l.accept(this, arg));
309    }
310
311    @Override
312    public void visit(final InstanceOfExpr nfinal A arg) {
313        n.getExpression().accept(this, arg);
314        n.getType().accept(this, arg);
315        n.getComment().ifPresent(l -> l.accept(this, arg));
316    }
317
318    @Override
319    public void visit(final IntegerLiteralExpr nfinal A arg) {
320        n.getComment().ifPresent(l -> l.accept(this, arg));
321    }
322
323    @Override
324    public void visit(final JavadocComment nfinal A arg) {
325        n.getComment().ifPresent(l -> l.accept(this, arg));
326    }
327
328    @Override
329    public void visit(final LabeledStmt nfinal A arg) {
330        n.getLabel().accept(this, arg);
331        n.getStatement().accept(this, arg);
332        n.getComment().ifPresent(l -> l.accept(this, arg));
333    }
334
335    @Override
336    public void visit(final LineComment nfinal A arg) {
337        n.getComment().ifPresent(l -> l.accept(this, arg));
338    }
339
340    @Override
341    public void visit(final LongLiteralExpr nfinal A arg) {
342        n.getComment().ifPresent(l -> l.accept(this, arg));
343    }
344
345    @Override
346    public void visit(final MarkerAnnotationExpr nfinal A arg) {
347        n.getName().accept(this, arg);
348        n.getComment().ifPresent(l -> l.accept(this, arg));
349    }
350
351    @Override
352    public void visit(final MemberValuePair nfinal A arg) {
353        n.getName().accept(this, arg);
354        n.getValue().accept(this, arg);
355        n.getComment().ifPresent(l -> l.accept(this, arg));
356    }
357
358    @Override
359    public void visit(final MethodCallExpr nfinal A arg) {
360        n.getArguments().forEach(p -> p.accept(this, arg));
361        n.getName().accept(this, arg);
362        n.getScope().ifPresent(l -> l.accept(this, arg));
363        n.getTypeArguments().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
364        n.getComment().ifPresent(l -> l.accept(this, arg));
365    }
366
367    @Override
368    public void visit(final MethodDeclaration nfinal A arg) {
369        n.getBody().ifPresent(l -> l.accept(this, arg));
370        n.getType().accept(this, arg);
371        n.getModifiers().forEach(p -> p.accept(this, arg));
372        n.getName().accept(this, arg);
373        n.getParameters().forEach(p -> p.accept(this, arg));
374        n.getReceiverParameter().ifPresent(l -> l.accept(this, arg));
375        n.getThrownExceptions().forEach(p -> p.accept(this, arg));
376        n.getTypeParameters().forEach(p -> p.accept(this, arg));
377        n.getAnnotations().forEach(p -> p.accept(this, arg));
378        n.getComment().ifPresent(l -> l.accept(this, arg));
379    }
380
381    @Override
382    public void visit(final NameExpr nfinal A arg) {
383        n.getName().accept(this, arg);
384        n.getComment().ifPresent(l -> l.accept(this, arg));
385    }
386
387    @Override
388    public void visit(final NormalAnnotationExpr nfinal A arg) {
389        n.getPairs().forEach(p -> p.accept(this, arg));
390        n.getName().accept(this, arg);
391        n.getComment().ifPresent(l -> l.accept(this, arg));
392    }
393
394    @Override
395    public void visit(final NullLiteralExpr nfinal A arg) {
396        n.getComment().ifPresent(l -> l.accept(this, arg));
397    }
398
399    @Override
400    public void visit(final ObjectCreationExpr nfinal A arg) {
401        n.getAnonymousClassBody().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
402        n.getArguments().forEach(p -> p.accept(this, arg));
403        n.getScope().ifPresent(l -> l.accept(this, arg));
404        n.getType().accept(this, arg);
405        n.getTypeArguments().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
406        n.getComment().ifPresent(l -> l.accept(this, arg));
407    }
408
409    @Override
410    public void visit(final PackageDeclaration nfinal A arg) {
411        n.getAnnotations().forEach(p -> p.accept(this, arg));
412        n.getName().accept(this, arg);
413        n.getComment().ifPresent(l -> l.accept(this, arg));
414    }
415
416    @Override
417    public void visit(final Parameter nfinal A arg) {
418        n.getAnnotations().forEach(p -> p.accept(this, arg));
419        n.getModifiers().forEach(p -> p.accept(this, arg));
420        n.getName().accept(this, arg);
421        n.getType().accept(this, arg);
422        n.getVarArgsAnnotations().forEach(p -> p.accept(this, arg));
423        n.getComment().ifPresent(l -> l.accept(this, arg));
424    }
425
426    @Override
427    public void visit(final PrimitiveType nfinal A arg) {
428        n.getAnnotations().forEach(p -> p.accept(this, arg));
429        n.getComment().ifPresent(l -> l.accept(this, arg));
430    }
431
432    @Override
433    public void visit(final Name nfinal A arg) {
434        n.getQualifier().ifPresent(l -> l.accept(this, arg));
435        n.getComment().ifPresent(l -> l.accept(this, arg));
436    }
437
438    @Override
439    public void visit(final SimpleName nfinal A arg) {
440        n.getComment().ifPresent(l -> l.accept(this, arg));
441    }
442
443    @Override
444    public void visit(final ArrayType nfinal A arg) {
445        n.getComponentType().accept(this, arg);
446        n.getAnnotations().forEach(p -> p.accept(this, arg));
447        n.getComment().ifPresent(l -> l.accept(this, arg));
448    }
449
450    @Override
451    public void visit(final ArrayCreationLevel nfinal A arg) {
452        n.getAnnotations().forEach(p -> p.accept(this, arg));
453        n.getDimension().ifPresent(l -> l.accept(this, arg));
454        n.getComment().ifPresent(l -> l.accept(this, arg));
455    }
456
457    @Override
458    public void visit(final IntersectionType nfinal A arg) {
459        n.getElements().forEach(p -> p.accept(this, arg));
460        n.getAnnotations().forEach(p -> p.accept(this, arg));
461        n.getComment().ifPresent(l -> l.accept(this, arg));
462    }
463
464    @Override
465    public void visit(final UnionType nfinal A arg) {
466        n.getElements().forEach(p -> p.accept(this, arg));
467        n.getAnnotations().forEach(p -> p.accept(this, arg));
468        n.getComment().ifPresent(l -> l.accept(this, arg));
469    }
470
471    @Override
472    public void visit(final ReturnStmt nfinal A arg) {
473        n.getExpression().ifPresent(l -> l.accept(this, arg));
474        n.getComment().ifPresent(l -> l.accept(this, arg));
475    }
476
477    @Override
478    public void visit(final SingleMemberAnnotationExpr nfinal A arg) {
479        n.getMemberValue().accept(this, arg);
480        n.getName().accept(this, arg);
481        n.getComment().ifPresent(l -> l.accept(this, arg));
482    }
483
484    @Override
485    public void visit(final StringLiteralExpr nfinal A arg) {
486        n.getComment().ifPresent(l -> l.accept(this, arg));
487    }
488
489    @Override
490    public void visit(final SuperExpr nfinal A arg) {
491        n.getTypeName().ifPresent(l -> l.accept(this, arg));
492        n.getComment().ifPresent(l -> l.accept(this, arg));
493    }
494
495    @Override
496    public void visit(final SwitchEntry nfinal A arg) {
497        n.getLabels().forEach(p -> p.accept(this, arg));
498        n.getStatements().forEach(p -> p.accept(this, arg));
499        n.getComment().ifPresent(l -> l.accept(this, arg));
500    }
501
502    @Override
503    public void visit(final SwitchStmt nfinal A arg) {
504        n.getEntries().forEach(p -> p.accept(this, arg));
505        n.getSelector().accept(this, arg);
506        n.getComment().ifPresent(l -> l.accept(this, arg));
507    }
508
509    @Override
510    public void visit(final SynchronizedStmt nfinal A arg) {
511        n.getBody().accept(this, arg);
512        n.getExpression().accept(this, arg);
513        n.getComment().ifPresent(l -> l.accept(this, arg));
514    }
515
516    @Override
517    public void visit(final ThisExpr nfinal A arg) {
518        n.getTypeName().ifPresent(l -> l.accept(this, arg));
519        n.getComment().ifPresent(l -> l.accept(this, arg));
520    }
521
522    @Override
523    public void visit(final ThrowStmt nfinal A arg) {
524        n.getExpression().accept(this, arg);
525        n.getComment().ifPresent(l -> l.accept(this, arg));
526    }
527
528    @Override
529    public void visit(final TryStmt nfinal A arg) {
530        n.getCatchClauses().forEach(p -> p.accept(this, arg));
531        n.getFinallyBlock().ifPresent(l -> l.accept(this, arg));
532        n.getResources().forEach(p -> p.accept(this, arg));
533        n.getTryBlock().accept(this, arg);
534        n.getComment().ifPresent(l -> l.accept(this, arg));
535    }
536
537    @Override
538    public void visit(final LocalClassDeclarationStmt nfinal A arg) {
539        n.getClassDeclaration().accept(this, arg);
540        n.getComment().ifPresent(l -> l.accept(this, arg));
541    }
542
543    @Override
544    public void visit(final TypeParameter nfinal A arg) {
545        n.getName().accept(this, arg);
546        n.getTypeBound().forEach(p -> p.accept(this, arg));
547        n.getAnnotations().forEach(p -> p.accept(this, arg));
548        n.getComment().ifPresent(l -> l.accept(this, arg));
549    }
550
551    @Override
552    public void visit(final UnaryExpr nfinal A arg) {
553        n.getExpression().accept(this, arg);
554        n.getComment().ifPresent(l -> l.accept(this, arg));
555    }
556
557    @Override
558    public void visit(final UnknownType nfinal A arg) {
559        n.getAnnotations().forEach(p -> p.accept(this, arg));
560        n.getComment().ifPresent(l -> l.accept(this, arg));
561    }
562
563    @Override
564    public void visit(final VariableDeclarationExpr nfinal A arg) {
565        n.getAnnotations().forEach(p -> p.accept(this, arg));
566        n.getModifiers().forEach(p -> p.accept(this, arg));
567        n.getVariables().forEach(p -> p.accept(this, arg));
568        n.getComment().ifPresent(l -> l.accept(this, arg));
569    }
570
571    @Override
572    public void visit(final VariableDeclarator nfinal A arg) {
573        n.getInitializer().ifPresent(l -> l.accept(this, arg));
574        n.getName().accept(this, arg);
575        n.getType().accept(this, arg);
576        n.getComment().ifPresent(l -> l.accept(this, arg));
577    }
578
579    @Override
580    public void visit(final VoidType nfinal A arg) {
581        n.getAnnotations().forEach(p -> p.accept(this, arg));
582        n.getComment().ifPresent(l -> l.accept(this, arg));
583    }
584
585    @Override
586    public void visit(final WhileStmt nfinal A arg) {
587        n.getBody().accept(this, arg);
588        n.getCondition().accept(this, arg);
589        n.getComment().ifPresent(l -> l.accept(this, arg));
590    }
591
592    @Override
593    public void visit(final WildcardType nfinal A arg) {
594        n.getExtendedType().ifPresent(l -> l.accept(this, arg));
595        n.getSuperType().ifPresent(l -> l.accept(this, arg));
596        n.getAnnotations().forEach(p -> p.accept(this, arg));
597        n.getComment().ifPresent(l -> l.accept(this, arg));
598    }
599
600    @Override
601    public void visit(final LambdaExpr nfinal A arg) {
602        n.getBody().accept(this, arg);
603        n.getParameters().forEach(p -> p.accept(this, arg));
604        n.getComment().ifPresent(l -> l.accept(this, arg));
605    }
606
607    @Override
608    public void visit(final MethodReferenceExpr nfinal A arg) {
609        n.getScope().accept(this, arg);
610        n.getTypeArguments().ifPresent(l -> l.forEach(v -> v.accept(this, arg)));
611        n.getComment().ifPresent(l -> l.accept(this, arg));
612    }
613
614    @Override
615    public void visit(final TypeExpr nfinal A arg) {
616        n.getType().accept(this, arg);
617        n.getComment().ifPresent(l -> l.accept(this, arg));
618    }
619
620    @Override
621    public void visit(NodeList nA arg) {
622        for (Object node : n) {
623            ((Nodenode).accept(this, arg);
624        }
625    }
626
627    @Override
628    public void visit(final ImportDeclaration nfinal A arg) {
629        n.getName().accept(this, arg);
630        n.getComment().ifPresent(l -> l.accept(this, arg));
631    }
632
633    public void visit(final ModuleDeclaration nfinal A arg) {
634        n.getAnnotations().forEach(p -> p.accept(this, arg));
635        n.getDirectives().forEach(p -> p.accept(this, arg));
636        n.getName().accept(this, arg);
637        n.getComment().ifPresent(l -> l.accept(this, arg));
638    }
639
640    public void visit(final ModuleRequiresDirective nfinal A arg) {
641        n.getModifiers().forEach(p -> p.accept(this, arg));
642        n.getName().accept(this, arg);
643        n.getComment().ifPresent(l -> l.accept(this, arg));
644    }
645
646    @Override
647    public void visit(final ModuleExportsDirective nfinal A arg) {
648        n.getModuleNames().forEach(p -> p.accept(this, arg));
649        n.getName().accept(this, arg);
650        n.getComment().ifPresent(l -> l.accept(this, arg));
651    }
652
653    @Override
654    public void visit(final ModuleProvidesDirective nfinal A arg) {
655        n.getName().accept(this, arg);
656        n.getWith().forEach(p -> p.accept(this, arg));
657        n.getComment().ifPresent(l -> l.accept(this, arg));
658    }
659
660    @Override
661    public void visit(final ModuleUsesDirective nfinal A arg) {
662        n.getName().accept(this, arg);
663        n.getComment().ifPresent(l -> l.accept(this, arg));
664    }
665
666    @Override
667    public void visit(final ModuleOpensDirective nfinal A arg) {
668        n.getModuleNames().forEach(p -> p.accept(this, arg));
669        n.getName().accept(this, arg);
670        n.getComment().ifPresent(l -> l.accept(this, arg));
671    }
672
673    @Override
674    public void visit(final UnparsableStmt nfinal A arg) {
675        n.getComment().ifPresent(l -> l.accept(this, arg));
676    }
677
678    @Override
679    public void visit(final ReceiverParameter nfinal A arg) {
680        n.getAnnotations().forEach(p -> p.accept(this, arg));
681        n.getName().accept(this, arg);
682        n.getType().accept(this, arg);
683        n.getComment().ifPresent(l -> l.accept(this, arg));
684    }
685
686    @Override
687    public void visit(final VarType nfinal A arg) {
688        n.getAnnotations().forEach(p -> p.accept(this, arg));
689        n.getComment().ifPresent(l -> l.accept(this, arg));
690    }
691
692    @Override
693    public void visit(final Modifier nfinal A arg) {
694        n.getComment().ifPresent(l -> l.accept(this, arg));
695    }
696
697    @Override
698    public void visit(final SwitchExpr nfinal A arg) {
699        n.getEntries().forEach(p -> p.accept(this, arg));
700        n.getSelector().accept(this, arg);
701        n.getComment().ifPresent(l -> l.accept(this, arg));
702    }
703
704    @Override
705    public void visit(final TextBlockLiteralExpr nfinal A arg) {
706        n.getComment().ifPresent(l -> l.accept(this, arg));
707    }
708
709    @Override
710    public void visit(final YieldStmt nfinal A arg) {
711        n.getExpression().accept(this, arg);
712        n.getComment().ifPresent(l -> l.accept(this, arg));
713    }
714}
715
MembersX
VoidVisitorAdapter:visit
Members
X