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