1 /* 2 * Copyright (C) 2007-2010 Jlio Vilmar Gesser. 3 * Copyright (C) 2011, 2013-2016 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 */ 21 22 package com.github.javaparser.ast.visitor; 23 24 import com.github.javaparser.ast.*; 25 import com.github.javaparser.ast.comments.BlockComment; 26 import com.github.javaparser.ast.comments.LineComment; 27 import com.github.javaparser.ast.type.TypeParameter; 28 import com.github.javaparser.ast.body.AnnotationDeclaration; 29 import com.github.javaparser.ast.body.AnnotationMemberDeclaration; 30 import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; 31 import com.github.javaparser.ast.body.ConstructorDeclaration; 32 import com.github.javaparser.ast.body.EmptyMemberDeclaration; 33 import com.github.javaparser.ast.body.EmptyTypeDeclaration; 34 import com.github.javaparser.ast.body.EnumConstantDeclaration; 35 import com.github.javaparser.ast.body.EnumDeclaration; 36 import com.github.javaparser.ast.body.FieldDeclaration; 37 import com.github.javaparser.ast.body.InitializerDeclaration; 38 import com.github.javaparser.ast.comments.JavadocComment; 39 import com.github.javaparser.ast.body.MethodDeclaration; 40 import com.github.javaparser.ast.body.Parameter; 41 import com.github.javaparser.ast.body.VariableDeclarator; 42 import com.github.javaparser.ast.body.VariableDeclaratorId; 43 import com.github.javaparser.ast.expr.*; 44 import com.github.javaparser.ast.stmt.AssertStmt; 45 import com.github.javaparser.ast.stmt.BlockStmt; 46 import com.github.javaparser.ast.stmt.BreakStmt; 47 import com.github.javaparser.ast.stmt.CatchClause; 48 import com.github.javaparser.ast.stmt.ContinueStmt; 49 import com.github.javaparser.ast.stmt.DoStmt; 50 import com.github.javaparser.ast.stmt.EmptyStmt; 51 import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt; 52 import com.github.javaparser.ast.stmt.ExpressionStmt; 53 import com.github.javaparser.ast.stmt.ForStmt; 54 import com.github.javaparser.ast.stmt.ForeachStmt; 55 import com.github.javaparser.ast.stmt.IfStmt; 56 import com.github.javaparser.ast.stmt.LabeledStmt; 57 import com.github.javaparser.ast.stmt.ReturnStmt; 58 import com.github.javaparser.ast.stmt.SwitchEntryStmt; 59 import com.github.javaparser.ast.stmt.SwitchStmt; 60 import com.github.javaparser.ast.stmt.SynchronizedStmt; 61 import com.github.javaparser.ast.stmt.ThrowStmt; 62 import com.github.javaparser.ast.stmt.TryStmt; 63 import com.github.javaparser.ast.stmt.TypeDeclarationStmt; 64 import com.github.javaparser.ast.stmt.WhileStmt; 65 import com.github.javaparser.ast.type.*; 66 67 /** 68 * A visitor that does not return anything. 69 * 70 * @author Julio Vilmar Gesser 71 */ 72 public interface VoidVisitor<A> { 73 74 //- Compilation Unit ---------------------------------- 75 76 void visit(CompilationUnit n, A arg); 77 78 void visit(PackageDeclaration n, A arg); 79 80 void visit(ImportDeclaration n, A arg); 81 82 void visit(TypeParameter n, A arg); 83 84 void visit(LineComment n, A arg); 85 86 void visit(BlockComment n, A arg); 87 88 //- Body ---------------------------------------------- 89 90 void visit(ClassOrInterfaceDeclaration n, A arg); 91 92 void visit(EnumDeclaration n, A arg); 93 94 void visit(EmptyTypeDeclaration n, A arg); 95 96 void visit(EnumConstantDeclaration n, A arg); 97 98 void visit(AnnotationDeclaration n, A arg); 99 100 void visit(AnnotationMemberDeclaration n, A arg); 101 102 void visit(FieldDeclaration n, A arg); 103 104 void visit(VariableDeclarator n, A arg); 105 106 void visit(VariableDeclaratorId n, A arg); 107 108 void visit(ConstructorDeclaration n, A arg); 109 110 void visit(MethodDeclaration n, A arg); 111 112 void visit(Parameter n, A arg); 113 114 void visit(EmptyMemberDeclaration n, A arg); 115 116 void visit(InitializerDeclaration n, A arg); 117 118 void visit(JavadocComment n, A arg); 119 120 //- Type ---------------------------------------------- 121 122 void visit(ClassOrInterfaceType n, A arg); 123 124 void visit(PrimitiveType n, A arg); 125 126 void visit(ArrayType n, A arg); 127 128 void visit(ArrayCreationLevel n, A arg); 129 130 void visit(IntersectionType n, A arg); 131 132 void visit(UnionType n, A arg); 133 134 void visit(VoidType n, A arg); 135 136 void visit(WildcardType n, A arg); 137 138 void visit(UnknownType n, A arg); 139 140 //- Expression ---------------------------------------- 141 142 void visit(ArrayAccessExpr n, A arg); 143 144 void visit(ArrayCreationExpr n, A arg); 145 146 void visit(ArrayInitializerExpr n, A arg); 147 148 void visit(AssignExpr n, A arg); 149 150 void visit(BinaryExpr n, A arg); 151 152 void visit(CastExpr n, A arg); 153 154 void visit(ClassExpr n, A arg); 155 156 void visit(ConditionalExpr n, A arg); 157 158 void visit(EnclosedExpr n, A arg); 159 160 void visit(FieldAccessExpr n, A arg); 161 162 void visit(InstanceOfExpr n, A arg); 163 164 void visit(StringLiteralExpr n, A arg); 165 166 void visit(IntegerLiteralExpr n, A arg); 167 168 void visit(LongLiteralExpr n, A arg); 169 170 void visit(IntegerLiteralMinValueExpr n, A arg); 171 172 void visit(LongLiteralMinValueExpr n, A arg); 173 174 void visit(CharLiteralExpr n, A arg); 175 176 void visit(DoubleLiteralExpr n, A arg); 177 178 void visit(BooleanLiteralExpr n, A arg); 179 180 void visit(NullLiteralExpr n, A arg); 181 182 void visit(MethodCallExpr n, A arg); 183 184 void visit(NameExpr n, A arg); 185 186 void visit(ObjectCreationExpr n, A arg); 187 188 void visit(QualifiedNameExpr n, A arg); 189 190 void visit(ThisExpr n, A arg); 191 192 void visit(SuperExpr n, A arg); 193 194 void visit(UnaryExpr n, A arg); 195 196 void visit(VariableDeclarationExpr n, A arg); 197 198 void visit(MarkerAnnotationExpr n, A arg); 199 200 void visit(SingleMemberAnnotationExpr n, A arg); 201 202 void visit(NormalAnnotationExpr n, A arg); 203 204 void visit(MemberValuePair n, A arg); 205 206 //- Statements ---------------------------------------- 207 208 void visit(ExplicitConstructorInvocationStmt n, A arg); 209 210 void visit(TypeDeclarationStmt n, A arg); 211 212 void visit(AssertStmt n, A arg); 213 214 void visit(BlockStmt n, A arg); 215 216 void visit(LabeledStmt n, A arg); 217 218 void visit(EmptyStmt n, A arg); 219 220 void visit(ExpressionStmt n, A arg); 221 222 void visit(SwitchStmt n, A arg); 223 224 void visit(SwitchEntryStmt n, A arg); 225 226 void visit(BreakStmt n, A arg); 227 228 void visit(ReturnStmt n, A arg); 229 230 void visit(IfStmt n, A arg); 231 232 void visit(WhileStmt n, A arg); 233 234 void visit(ContinueStmt n, A arg); 235 236 void visit(DoStmt n, A arg); 237 238 void visit(ForeachStmt n, A arg); 239 240 void visit(ForStmt n, A arg); 241 242 void visit(ThrowStmt n, A arg); 243 244 void visit(SynchronizedStmt n, A arg); 245 246 void visit(TryStmt n, A arg); 247 248 void visit(CatchClause n, A arg); 249 250 void visit(LambdaExpr n, A arg); 251 252 void visit(MethodReferenceExpr n, A arg); 253 254 void visit(TypeExpr n, A arg); 255 256 void visit(ArrayBracketPair arrayBracketPair, A arg); 257 } 258