1 /******************************************************************************* 2 * Copyright (c) 2000, 2004 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Common Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/cpl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.jdt.internal.compiler; 12 13 import org.eclipse.jdt.core.compiler.*; 14 import org.eclipse.jdt.internal.compiler.ast.*; 15 import org.eclipse.jdt.internal.compiler.lookup.*; 16 17 /** 18 * A visitor for iterating through the parse tree. 19 */ 20 public abstract class ASTVisitor { 21 acceptProblem(IProblem problem)22 public void acceptProblem(IProblem problem) { 23 // do nothing by default 24 } endVisit( AllocationExpression allocationExpression, BlockScope scope)25 public void endVisit( 26 AllocationExpression allocationExpression, 27 BlockScope scope) { 28 // do nothing by default 29 } endVisit(AND_AND_Expression and_and_Expression, BlockScope scope)30 public void endVisit(AND_AND_Expression and_and_Expression, BlockScope scope) { 31 // do nothing by default 32 } endVisit( AnnotationTypeDeclaration annotationTypeDeclaration, BlockScope scope)33 public void endVisit( 34 AnnotationTypeDeclaration annotationTypeDeclaration, 35 BlockScope scope) { 36 // do nothing by default 37 } endVisit( AnnotationTypeDeclaration annotationTypeDeclaration, ClassScope scope)38 public void endVisit( 39 AnnotationTypeDeclaration annotationTypeDeclaration, 40 ClassScope scope) { 41 // do nothing by default 42 } endVisit( AnnotationTypeDeclaration annotationTypeDeclaration, CompilationUnitScope scope)43 public void endVisit( 44 AnnotationTypeDeclaration annotationTypeDeclaration, 45 CompilationUnitScope scope) { 46 // do nothing by default 47 } endVisit( AnnotationTypeMemberDeclaration annotationTypeDeclaration, ClassScope classScope)48 public void endVisit( 49 AnnotationTypeMemberDeclaration annotationTypeDeclaration, 50 ClassScope classScope) { 51 // do nothing by default 52 } endVisit(Argument argument, BlockScope scope)53 public void endVisit(Argument argument, BlockScope scope) { 54 // do nothing by default 55 } endVisit( ArrayAllocationExpression arrayAllocationExpression, BlockScope scope)56 public void endVisit( 57 ArrayAllocationExpression arrayAllocationExpression, 58 BlockScope scope) { 59 // do nothing by default 60 } endVisit(ArrayInitializer arrayInitializer, BlockScope scope)61 public void endVisit(ArrayInitializer arrayInitializer, BlockScope scope) { 62 // do nothing by default 63 } endVisit( ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope)64 public void endVisit( 65 ArrayQualifiedTypeReference arrayQualifiedTypeReference, 66 BlockScope scope) { 67 // do nothing by default 68 } endVisit( ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope)69 public void endVisit( 70 ArrayQualifiedTypeReference arrayQualifiedTypeReference, 71 ClassScope scope) { 72 // do nothing by default 73 } endVisit(ArrayReference arrayReference, BlockScope scope)74 public void endVisit(ArrayReference arrayReference, BlockScope scope) { 75 // do nothing by default 76 } endVisit(ArrayTypeReference arrayTypeReference, BlockScope scope)77 public void endVisit(ArrayTypeReference arrayTypeReference, BlockScope scope) { 78 // do nothing by default 79 } endVisit(ArrayTypeReference arrayTypeReference, ClassScope scope)80 public void endVisit(ArrayTypeReference arrayTypeReference, ClassScope scope) { 81 // do nothing by default 82 } endVisit(AssertStatement assertStatement, BlockScope scope)83 public void endVisit(AssertStatement assertStatement, BlockScope scope) { 84 // do nothing by default 85 } endVisit(Assignment assignment, BlockScope scope)86 public void endVisit(Assignment assignment, BlockScope scope) { 87 // do nothing by default 88 } endVisit(BinaryExpression binaryExpression, BlockScope scope)89 public void endVisit(BinaryExpression binaryExpression, BlockScope scope) { 90 // do nothing by default 91 } endVisit(Block block, BlockScope scope)92 public void endVisit(Block block, BlockScope scope) { 93 // do nothing by default 94 } endVisit(BreakStatement breakStatement, BlockScope scope)95 public void endVisit(BreakStatement breakStatement, BlockScope scope) { 96 // do nothing by default 97 } endVisit(CaseStatement caseStatement, BlockScope scope)98 public void endVisit(CaseStatement caseStatement, BlockScope scope) { 99 // do nothing by default 100 } endVisit(CastExpression castExpression, BlockScope scope)101 public void endVisit(CastExpression castExpression, BlockScope scope) { 102 // do nothing by default 103 } endVisit(CharLiteral charLiteral, BlockScope scope)104 public void endVisit(CharLiteral charLiteral, BlockScope scope) { 105 // do nothing by default 106 } endVisit(ClassLiteralAccess classLiteral, BlockScope scope)107 public void endVisit(ClassLiteralAccess classLiteral, BlockScope scope) { 108 // do nothing by default 109 } endVisit(Clinit clinit, ClassScope scope)110 public void endVisit(Clinit clinit, ClassScope scope) { 111 // do nothing by default 112 } endVisit( CompilationUnitDeclaration compilationUnitDeclaration, CompilationUnitScope scope)113 public void endVisit( 114 CompilationUnitDeclaration compilationUnitDeclaration, 115 CompilationUnitScope scope) { 116 // do nothing by default 117 } endVisit(CompoundAssignment compoundAssignment, BlockScope scope)118 public void endVisit(CompoundAssignment compoundAssignment, BlockScope scope) { 119 // do nothing by default 120 } endVisit( ConditionalExpression conditionalExpression, BlockScope scope)121 public void endVisit( 122 ConditionalExpression conditionalExpression, 123 BlockScope scope) { 124 // do nothing by default 125 } endVisit( ConstructorDeclaration constructorDeclaration, ClassScope scope)126 public void endVisit( 127 ConstructorDeclaration constructorDeclaration, 128 ClassScope scope) { 129 // do nothing by default 130 } endVisit(ContinueStatement continueStatement, BlockScope scope)131 public void endVisit(ContinueStatement continueStatement, BlockScope scope) { 132 // do nothing by default 133 } endVisit(DoStatement doStatement, BlockScope scope)134 public void endVisit(DoStatement doStatement, BlockScope scope) { 135 // do nothing by default 136 } endVisit(DoubleLiteral doubleLiteral, BlockScope scope)137 public void endVisit(DoubleLiteral doubleLiteral, BlockScope scope) { 138 // do nothing by default 139 } endVisit(EmptyStatement emptyStatement, BlockScope scope)140 public void endVisit(EmptyStatement emptyStatement, BlockScope scope) { 141 // do nothing by default 142 } endVisit(EnumConstant enumDeclaration, ClassScope scope)143 public void endVisit(EnumConstant enumDeclaration, ClassScope scope) { 144 // do nothing by default 145 } endVisit(EnumDeclaration enumDeclaration, BlockScope scope)146 public void endVisit(EnumDeclaration enumDeclaration, BlockScope scope) { 147 // do nothing by default 148 } endVisit(EnumDeclaration enumDeclaration, ClassScope scope)149 public void endVisit(EnumDeclaration enumDeclaration, ClassScope scope) { 150 // do nothing by default 151 } endVisit(EnumDeclaration enumDeclaration, CompilationUnitScope scope)152 public void endVisit(EnumDeclaration enumDeclaration, CompilationUnitScope scope) { 153 // do nothing by default 154 } endVisit(EqualExpression equalExpression, BlockScope scope)155 public void endVisit(EqualExpression equalExpression, BlockScope scope) { 156 // do nothing by default 157 } endVisit( ExplicitConstructorCall explicitConstructor, BlockScope scope)158 public void endVisit( 159 ExplicitConstructorCall explicitConstructor, 160 BlockScope scope) { 161 // do nothing by default 162 } endVisit( ExtendedStringLiteral extendedStringLiteral, BlockScope scope)163 public void endVisit( 164 ExtendedStringLiteral extendedStringLiteral, 165 BlockScope scope) { 166 // do nothing by default 167 } endVisit(FalseLiteral falseLiteral, BlockScope scope)168 public void endVisit(FalseLiteral falseLiteral, BlockScope scope) { 169 // do nothing by default 170 } endVisit(FieldDeclaration fieldDeclaration, MethodScope scope)171 public void endVisit(FieldDeclaration fieldDeclaration, MethodScope scope) { 172 // do nothing by default 173 } endVisit(FieldReference fieldReference, BlockScope scope)174 public void endVisit(FieldReference fieldReference, BlockScope scope) { 175 // do nothing by default 176 } endVisit(FloatLiteral floatLiteral, BlockScope scope)177 public void endVisit(FloatLiteral floatLiteral, BlockScope scope) { 178 // do nothing by default 179 } endVisit(ForeachStatement forStatement, BlockScope scope)180 public void endVisit(ForeachStatement forStatement, BlockScope scope) { 181 // do nothing by default 182 } endVisit(ForStatement forStatement, BlockScope scope)183 public void endVisit(ForStatement forStatement, BlockScope scope) { 184 // do nothing by default 185 } endVisit(IfStatement ifStatement, BlockScope scope)186 public void endVisit(IfStatement ifStatement, BlockScope scope) { 187 // do nothing by default 188 } endVisit(ImportReference importRef, CompilationUnitScope scope)189 public void endVisit(ImportReference importRef, CompilationUnitScope scope) { 190 // do nothing by default 191 } endVisit(Initializer initializer, MethodScope scope)192 public void endVisit(Initializer initializer, MethodScope scope) { 193 // do nothing by default 194 } endVisit( InstanceOfExpression instanceOfExpression, BlockScope scope)195 public void endVisit( 196 InstanceOfExpression instanceOfExpression, 197 BlockScope scope) { 198 // do nothing by default 199 } endVisit(IntLiteral intLiteral, BlockScope scope)200 public void endVisit(IntLiteral intLiteral, BlockScope scope) { 201 // do nothing by default 202 } endVisit(JavadocArgumentExpression expression, BlockScope scope)203 public void endVisit(JavadocArgumentExpression expression, BlockScope scope) { 204 // do nothing by default 205 } endVisit(JavadocArrayQualifiedTypeReference typeRef, BlockScope scope)206 public void endVisit(JavadocArrayQualifiedTypeReference typeRef, BlockScope scope) { 207 // do nothing by default 208 } endVisit(JavadocArraySingleTypeReference typeRef, BlockScope scope)209 public void endVisit(JavadocArraySingleTypeReference typeRef, BlockScope scope) { 210 // do nothing by default 211 } endVisit(JavadocFieldReference fieldRef, BlockScope scope)212 public void endVisit(JavadocFieldReference fieldRef, BlockScope scope) { 213 // do nothing by default 214 } endVisit(JavadocMessageSend messageSend, BlockScope scope)215 public void endVisit(JavadocMessageSend messageSend, BlockScope scope) { 216 // do nothing by default 217 } endVisit(JavadocQualifiedTypeReference typeRef, BlockScope scope)218 public void endVisit(JavadocQualifiedTypeReference typeRef, BlockScope scope) { 219 // do nothing by default 220 } endVisit(JavadocReturnStatement statement, BlockScope scope)221 public void endVisit(JavadocReturnStatement statement, BlockScope scope) { 222 // do nothing by default 223 } endVisit(JavadocSingleNameReference argument, BlockScope scope)224 public void endVisit(JavadocSingleNameReference argument, BlockScope scope) { 225 // do nothing by default 226 } endVisit(JavadocSingleTypeReference typeRef, BlockScope scope)227 public void endVisit(JavadocSingleTypeReference typeRef, BlockScope scope) { 228 // do nothing by default 229 } endVisit(LabeledStatement labeledStatement, BlockScope scope)230 public void endVisit(LabeledStatement labeledStatement, BlockScope scope) { 231 // do nothing by default 232 } endVisit(LocalDeclaration localDeclaration, BlockScope scope)233 public void endVisit(LocalDeclaration localDeclaration, BlockScope scope) { 234 // do nothing by default 235 } endVisit(LongLiteral longLiteral, BlockScope scope)236 public void endVisit(LongLiteral longLiteral, BlockScope scope) { 237 // do nothing by default 238 } 239 /** 240 * @param annotation 241 * @param scope 242 * @since 3.1 243 */ endVisit(MarkerAnnotation annotation, BlockScope scope)244 public void endVisit(MarkerAnnotation annotation, BlockScope scope) { 245 // do nothing by default 246 } 247 /** 248 * @param annotation 249 * @param scope 250 * @since 3.1 251 */ endVisit(MarkerAnnotation annotation, ClassScope scope)252 public void endVisit(MarkerAnnotation annotation, ClassScope scope) { 253 // do nothing by default 254 } 255 /** 256 * @param annotation 257 * @param scope 258 * @since 3.1 259 */ endVisit(MarkerAnnotation annotation, CompilationUnitScope scope)260 public void endVisit(MarkerAnnotation annotation, CompilationUnitScope scope) { 261 // do nothing by default 262 } 263 /** 264 * @param pair 265 * @param scope 266 */ endVisit(MemberValuePair pair, BlockScope scope)267 public void endVisit(MemberValuePair pair, BlockScope scope) { 268 // do nothing by default 269 } 270 /** 271 * @param pair 272 * @param scope 273 */ endVisit(MemberValuePair pair, ClassScope scope)274 public void endVisit(MemberValuePair pair, ClassScope scope) { 275 // do nothing by default 276 } 277 /** 278 * @param pair 279 * @param scope 280 */ endVisit(MemberValuePair pair, CompilationUnitScope scope)281 public void endVisit(MemberValuePair pair, CompilationUnitScope scope) { 282 // do nothing by default 283 } endVisit(MessageSend messageSend, BlockScope scope)284 public void endVisit(MessageSend messageSend, BlockScope scope) { 285 // do nothing by default 286 } endVisit(MethodDeclaration methodDeclaration, ClassScope scope)287 public void endVisit(MethodDeclaration methodDeclaration, ClassScope scope) { 288 // do nothing by default 289 } endVisit(StringLiteralConcatenation literal, BlockScope scope)290 public void endVisit(StringLiteralConcatenation literal, BlockScope scope) { 291 // do nothing by default 292 } 293 /** 294 * @param annotation 295 * @param scope 296 * @since 3.1 297 */ endVisit(NormalAnnotation annotation, BlockScope scope)298 public void endVisit(NormalAnnotation annotation, BlockScope scope) { 299 // do nothing by default 300 } 301 /** 302 * @param annotation 303 * @param scope 304 * @since 3.1 305 */ endVisit(NormalAnnotation annotation, ClassScope scope)306 public void endVisit(NormalAnnotation annotation, ClassScope scope) { 307 // do nothing by default 308 } 309 /** 310 * @param annotation 311 * @param scope 312 * @since 3.1 313 */ endVisit(NormalAnnotation annotation, CompilationUnitScope scope)314 public void endVisit(NormalAnnotation annotation, CompilationUnitScope scope) { 315 // do nothing by default 316 } endVisit(NullLiteral nullLiteral, BlockScope scope)317 public void endVisit(NullLiteral nullLiteral, BlockScope scope) { 318 // do nothing by default 319 } endVisit(OR_OR_Expression or_or_Expression, BlockScope scope)320 public void endVisit(OR_OR_Expression or_or_Expression, BlockScope scope) { 321 // do nothing by default 322 } endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope)323 public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) { 324 // do nothing by default 325 } endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope)326 public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) { 327 // do nothing by default 328 } endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope)329 public void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) { 330 // do nothing by default 331 } endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope)332 public void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) { 333 // do nothing by default 334 } endVisit(PostfixExpression postfixExpression, BlockScope scope)335 public void endVisit(PostfixExpression postfixExpression, BlockScope scope) { 336 // do nothing by default 337 } endVisit(PrefixExpression prefixExpression, BlockScope scope)338 public void endVisit(PrefixExpression prefixExpression, BlockScope scope) { 339 // do nothing by default 340 } endVisit( QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope)341 public void endVisit( 342 QualifiedAllocationExpression qualifiedAllocationExpression, 343 BlockScope scope) { 344 // do nothing by default 345 } endVisit( QualifiedNameReference qualifiedNameReference, BlockScope scope)346 public void endVisit( 347 QualifiedNameReference qualifiedNameReference, 348 BlockScope scope) { 349 // do nothing by default 350 } endVisit( QualifiedSuperReference qualifiedSuperReference, BlockScope scope)351 public void endVisit( 352 QualifiedSuperReference qualifiedSuperReference, 353 BlockScope scope) { 354 // do nothing by default 355 } endVisit( QualifiedThisReference qualifiedThisReference, BlockScope scope)356 public void endVisit( 357 QualifiedThisReference qualifiedThisReference, 358 BlockScope scope) { 359 // do nothing by default 360 } endVisit( QualifiedTypeReference qualifiedTypeReference, BlockScope scope)361 public void endVisit( 362 QualifiedTypeReference qualifiedTypeReference, 363 BlockScope scope) { 364 // do nothing by default 365 } endVisit( QualifiedTypeReference qualifiedTypeReference, ClassScope scope)366 public void endVisit( 367 QualifiedTypeReference qualifiedTypeReference, 368 ClassScope scope) { 369 // do nothing by default 370 } endVisit(ReturnStatement returnStatement, BlockScope scope)371 public void endVisit(ReturnStatement returnStatement, BlockScope scope) { 372 // do nothing by default 373 } 374 /** 375 * @param annotation 376 * @param scope 377 * @since 3.1 378 */ endVisit(SingleMemberAnnotation annotation, BlockScope scope)379 public void endVisit(SingleMemberAnnotation annotation, BlockScope scope) { 380 // do nothing by default 381 } 382 /** 383 * @param annotation 384 * @param scope 385 * @since 3.1 386 */ endVisit(SingleMemberAnnotation annotation, ClassScope scope)387 public void endVisit(SingleMemberAnnotation annotation, ClassScope scope) { 388 // do nothing by default 389 } 390 /** 391 * @param annotation 392 * @param scope 393 * @since 3.1 394 */ endVisit(SingleMemberAnnotation annotation, CompilationUnitScope scope)395 public void endVisit(SingleMemberAnnotation annotation, CompilationUnitScope scope) { 396 // do nothing by default 397 } endVisit( SingleNameReference singleNameReference, BlockScope scope)398 public void endVisit( 399 SingleNameReference singleNameReference, 400 BlockScope scope) { 401 // do nothing by default 402 } endVisit( SingleTypeReference singleTypeReference, BlockScope scope)403 public void endVisit( 404 SingleTypeReference singleTypeReference, 405 BlockScope scope) { 406 // do nothing by default 407 } endVisit( SingleTypeReference singleTypeReference, ClassScope scope)408 public void endVisit( 409 SingleTypeReference singleTypeReference, 410 ClassScope scope) { 411 // do nothing by default 412 } endVisit(StringLiteral stringLiteral, BlockScope scope)413 public void endVisit(StringLiteral stringLiteral, BlockScope scope) { 414 // do nothing by default 415 } endVisit(SuperReference superReference, BlockScope scope)416 public void endVisit(SuperReference superReference, BlockScope scope) { 417 // do nothing by default 418 } endVisit(SwitchStatement switchStatement, BlockScope scope)419 public void endVisit(SwitchStatement switchStatement, BlockScope scope) { 420 // do nothing by default 421 } endVisit( SynchronizedStatement synchronizedStatement, BlockScope scope)422 public void endVisit( 423 SynchronizedStatement synchronizedStatement, 424 BlockScope scope) { 425 // do nothing by default 426 } endVisit(ThisReference thisReference, BlockScope scope)427 public void endVisit(ThisReference thisReference, BlockScope scope) { 428 // do nothing by default 429 } endVisit(ThrowStatement throwStatement, BlockScope scope)430 public void endVisit(ThrowStatement throwStatement, BlockScope scope) { 431 // do nothing by default 432 } endVisit(TrueLiteral trueLiteral, BlockScope scope)433 public void endVisit(TrueLiteral trueLiteral, BlockScope scope) { 434 // do nothing by default 435 } endVisit(TryStatement tryStatement, BlockScope scope)436 public void endVisit(TryStatement tryStatement, BlockScope scope) { 437 // do nothing by default 438 } endVisit( TypeDeclaration localTypeDeclaration, BlockScope scope)439 public void endVisit( 440 TypeDeclaration localTypeDeclaration, 441 BlockScope scope) { 442 // do nothing by default 443 } endVisit( TypeDeclaration memberTypeDeclaration, ClassScope scope)444 public void endVisit( 445 TypeDeclaration memberTypeDeclaration, 446 ClassScope scope) { 447 // do nothing by default 448 } endVisit( TypeDeclaration typeDeclaration, CompilationUnitScope scope)449 public void endVisit( 450 TypeDeclaration typeDeclaration, 451 CompilationUnitScope scope) { 452 // do nothing by default 453 } endVisit(TypeParameter typeParameter, BlockScope scope)454 public void endVisit(TypeParameter typeParameter, BlockScope scope) { 455 // do nothing by default 456 } endVisit(TypeParameter typeParameter, ClassScope scope)457 public void endVisit(TypeParameter typeParameter, ClassScope scope) { 458 // do nothing by default 459 } endVisit(UnaryExpression unaryExpression, BlockScope scope)460 public void endVisit(UnaryExpression unaryExpression, BlockScope scope) { 461 // do nothing by default 462 } endVisit(WhileStatement whileStatement, BlockScope scope)463 public void endVisit(WhileStatement whileStatement, BlockScope scope) { 464 // do nothing by default 465 } endVisit(Wildcard wildcard, BlockScope scope)466 public void endVisit(Wildcard wildcard, BlockScope scope) { 467 // do nothing by default 468 } endVisit(Wildcard wildcard, ClassScope scope)469 public void endVisit(Wildcard wildcard, ClassScope scope) { 470 // do nothing by default 471 } visit( AllocationExpression allocationExpression, BlockScope scope)472 public boolean visit( 473 AllocationExpression allocationExpression, 474 BlockScope scope) { 475 return true; // do nothing by default, keep traversing 476 } visit(AND_AND_Expression and_and_Expression, BlockScope scope)477 public boolean visit(AND_AND_Expression and_and_Expression, BlockScope scope) { 478 return true; // do nothing by default, keep traversing 479 } visit( AnnotationTypeDeclaration annotationTypeDeclaration, BlockScope scope)480 public boolean visit( 481 AnnotationTypeDeclaration annotationTypeDeclaration, 482 BlockScope scope) { 483 return true; // do nothing by default, keep traversing 484 } visit( AnnotationTypeDeclaration annotationTypeDeclaration, ClassScope scope)485 public boolean visit( 486 AnnotationTypeDeclaration annotationTypeDeclaration, 487 ClassScope scope) { 488 return true; // do nothing by default, keep traversing 489 } visit( AnnotationTypeDeclaration annotationTypeDeclaration, CompilationUnitScope scope)490 public boolean visit( 491 AnnotationTypeDeclaration annotationTypeDeclaration, 492 CompilationUnitScope scope) { 493 return true; // do nothing by default, keep traversing 494 } visit( AnnotationTypeMemberDeclaration annotationTypeDeclaration, ClassScope classScope)495 public boolean visit( 496 AnnotationTypeMemberDeclaration annotationTypeDeclaration, 497 ClassScope classScope) { 498 return true; // do nothing by default, keep traversing 499 } visit(Argument argument, BlockScope scope)500 public boolean visit(Argument argument, BlockScope scope) { 501 return true; // do nothing by default, keep traversing 502 } visit( ArrayAllocationExpression arrayAllocationExpression, BlockScope scope)503 public boolean visit( 504 ArrayAllocationExpression arrayAllocationExpression, 505 BlockScope scope) { 506 return true; // do nothing by default, keep traversing 507 } visit(ArrayInitializer arrayInitializer, BlockScope scope)508 public boolean visit(ArrayInitializer arrayInitializer, BlockScope scope) { 509 return true; // do nothing by default, keep traversing 510 } visit( ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope)511 public boolean visit( 512 ArrayQualifiedTypeReference arrayQualifiedTypeReference, 513 BlockScope scope) { 514 return true; // do nothing by default, keep traversing 515 } visit( ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope)516 public boolean visit( 517 ArrayQualifiedTypeReference arrayQualifiedTypeReference, 518 ClassScope scope) { 519 return true; // do nothing by default, keep traversing 520 } visit(ArrayReference arrayReference, BlockScope scope)521 public boolean visit(ArrayReference arrayReference, BlockScope scope) { 522 return true; // do nothing by default, keep traversing 523 } visit(ArrayTypeReference arrayTypeReference, BlockScope scope)524 public boolean visit(ArrayTypeReference arrayTypeReference, BlockScope scope) { 525 return true; // do nothing by default, keep traversing 526 } visit(ArrayTypeReference arrayTypeReference, ClassScope scope)527 public boolean visit(ArrayTypeReference arrayTypeReference, ClassScope scope) { 528 return true; // do nothing by default, keep traversing 529 } visit(AssertStatement assertStatement, BlockScope scope)530 public boolean visit(AssertStatement assertStatement, BlockScope scope) { 531 return true; // do nothing by default, keep traversing 532 } visit(Assignment assignment, BlockScope scope)533 public boolean visit(Assignment assignment, BlockScope scope) { 534 return true; // do nothing by default, keep traversing 535 } visit(BinaryExpression binaryExpression, BlockScope scope)536 public boolean visit(BinaryExpression binaryExpression, BlockScope scope) { 537 return true; // do nothing by default, keep traversing 538 } visit(Block block, BlockScope scope)539 public boolean visit(Block block, BlockScope scope) { 540 return true; // do nothing by default, keep traversing 541 } visit(BreakStatement breakStatement, BlockScope scope)542 public boolean visit(BreakStatement breakStatement, BlockScope scope) { 543 return true; // do nothing by default, keep traversing 544 } visit(CaseStatement caseStatement, BlockScope scope)545 public boolean visit(CaseStatement caseStatement, BlockScope scope) { 546 return true; // do nothing by default, keep traversing 547 } visit(CastExpression castExpression, BlockScope scope)548 public boolean visit(CastExpression castExpression, BlockScope scope) { 549 return true; // do nothing by default, keep traversing 550 } visit(CharLiteral charLiteral, BlockScope scope)551 public boolean visit(CharLiteral charLiteral, BlockScope scope) { 552 return true; // do nothing by default, keep traversing 553 } visit(ClassLiteralAccess classLiteral, BlockScope scope)554 public boolean visit(ClassLiteralAccess classLiteral, BlockScope scope) { 555 return true; // do nothing by default, keep traversing 556 } visit(Clinit clinit, ClassScope scope)557 public boolean visit(Clinit clinit, ClassScope scope) { 558 return true; // do nothing by default, keep traversing 559 } visit( CompilationUnitDeclaration compilationUnitDeclaration, CompilationUnitScope scope)560 public boolean visit( 561 CompilationUnitDeclaration compilationUnitDeclaration, 562 CompilationUnitScope scope) { 563 return true; // do nothing by default, keep traversing 564 } visit(CompoundAssignment compoundAssignment, BlockScope scope)565 public boolean visit(CompoundAssignment compoundAssignment, BlockScope scope) { 566 return true; // do nothing by default, keep traversing 567 } visit( ConditionalExpression conditionalExpression, BlockScope scope)568 public boolean visit( 569 ConditionalExpression conditionalExpression, 570 BlockScope scope) { 571 return true; // do nothing by default, keep traversing 572 } visit( ConstructorDeclaration constructorDeclaration, ClassScope scope)573 public boolean visit( 574 ConstructorDeclaration constructorDeclaration, 575 ClassScope scope) { 576 return true; // do nothing by default, keep traversing 577 } visit(ContinueStatement continueStatement, BlockScope scope)578 public boolean visit(ContinueStatement continueStatement, BlockScope scope) { 579 return true; // do nothing by default, keep traversing 580 } visit(DoStatement doStatement, BlockScope scope)581 public boolean visit(DoStatement doStatement, BlockScope scope) { 582 return true; // do nothing by default, keep traversing 583 } visit(DoubleLiteral doubleLiteral, BlockScope scope)584 public boolean visit(DoubleLiteral doubleLiteral, BlockScope scope) { 585 return true; // do nothing by default, keep traversing 586 } visit(EmptyStatement emptyStatement, BlockScope scope)587 public boolean visit(EmptyStatement emptyStatement, BlockScope scope) { 588 return true; // do nothing by default, keep traversing 589 } visit(EnumConstant enumConstant, ClassScope scope)590 public boolean visit(EnumConstant enumConstant, ClassScope scope) { 591 return true; // do nothing by default, keep traversing 592 } visit(EnumDeclaration enumDeclaration, BlockScope scope)593 public boolean visit(EnumDeclaration enumDeclaration, BlockScope scope) { 594 return true; // do nothing by default, keep traversing 595 } visit(EnumDeclaration enumDeclaration, ClassScope scope)596 public boolean visit(EnumDeclaration enumDeclaration, ClassScope scope) { 597 return true; // do nothing by default, keep traversing 598 } visit(EnumDeclaration enumDeclaration, CompilationUnitScope scope)599 public boolean visit(EnumDeclaration enumDeclaration, CompilationUnitScope scope) { 600 return true; // do nothing by default, keep traversing 601 } visit(EqualExpression equalExpression, BlockScope scope)602 public boolean visit(EqualExpression equalExpression, BlockScope scope) { 603 return true; // do nothing by default, keep traversing 604 } visit( ExplicitConstructorCall explicitConstructor, BlockScope scope)605 public boolean visit( 606 ExplicitConstructorCall explicitConstructor, 607 BlockScope scope) { 608 return true; // do nothing by default, keep traversing 609 } visit( ExtendedStringLiteral extendedStringLiteral, BlockScope scope)610 public boolean visit( 611 ExtendedStringLiteral extendedStringLiteral, 612 BlockScope scope) { 613 return true; // do nothing by default, keep traversing 614 } visit(FalseLiteral falseLiteral, BlockScope scope)615 public boolean visit(FalseLiteral falseLiteral, BlockScope scope) { 616 return true; // do nothing by default, keep traversing 617 } visit(FieldDeclaration fieldDeclaration, MethodScope scope)618 public boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope) { 619 return true; // do nothing by default, keep traversing 620 } visit(FieldReference fieldReference, BlockScope scope)621 public boolean visit(FieldReference fieldReference, BlockScope scope) { 622 return true; // do nothing by default, keep traversing 623 } visit(FloatLiteral floatLiteral, BlockScope scope)624 public boolean visit(FloatLiteral floatLiteral, BlockScope scope) { 625 return true; // do nothing by default, keep traversing 626 } visit(ForeachStatement forStatement, BlockScope scope)627 public boolean visit(ForeachStatement forStatement, BlockScope scope) { 628 return true; // do nothing by default, keep traversing 629 } visit(ForStatement forStatement, BlockScope scope)630 public boolean visit(ForStatement forStatement, BlockScope scope) { 631 return true; // do nothing by default, keep traversing 632 } visit(IfStatement ifStatement, BlockScope scope)633 public boolean visit(IfStatement ifStatement, BlockScope scope) { 634 return true; // do nothing by default, keep traversing 635 } visit(ImportReference importRef, CompilationUnitScope scope)636 public boolean visit(ImportReference importRef, CompilationUnitScope scope) { 637 return true; // do nothing by default, keep traversing 638 } visit(Initializer initializer, MethodScope scope)639 public boolean visit(Initializer initializer, MethodScope scope) { 640 return true; // do nothing by default, keep traversing 641 } visit( InstanceOfExpression instanceOfExpression, BlockScope scope)642 public boolean visit( 643 InstanceOfExpression instanceOfExpression, 644 BlockScope scope) { 645 return true; // do nothing by default, keep traversing 646 } visit(IntLiteral intLiteral, BlockScope scope)647 public boolean visit(IntLiteral intLiteral, BlockScope scope) { 648 return true; // do nothing by default, keep traversing 649 } visit(JavadocArgumentExpression expression, BlockScope scope)650 public boolean visit(JavadocArgumentExpression expression, BlockScope scope) { 651 return true; // do nothing by default, keep traversing 652 } visit(JavadocArrayQualifiedTypeReference typeRef, BlockScope scope)653 public boolean visit(JavadocArrayQualifiedTypeReference typeRef, BlockScope scope) { 654 return true; // do nothing by default, keep traversing 655 } visit(JavadocArraySingleTypeReference typeRef, BlockScope scope)656 public boolean visit(JavadocArraySingleTypeReference typeRef, BlockScope scope) { 657 return true; // do nothing by default, keep traversing 658 } visit(JavadocFieldReference fieldRef, BlockScope scope)659 public boolean visit(JavadocFieldReference fieldRef, BlockScope scope) { 660 return true; // do nothing by default, keep traversing 661 } visit(JavadocMessageSend messageSend, BlockScope scope)662 public boolean visit(JavadocMessageSend messageSend, BlockScope scope) { 663 return true; // do nothing by default, keep traversing 664 } visit(JavadocQualifiedTypeReference typeRef, BlockScope scope)665 public boolean visit(JavadocQualifiedTypeReference typeRef, BlockScope scope) { 666 return true; // do nothing by default, keep traversing 667 } visit(JavadocReturnStatement statement, BlockScope scope)668 public boolean visit(JavadocReturnStatement statement, BlockScope scope) { 669 return true; // do nothing by default, keep traversing 670 } visit(JavadocSingleNameReference argument, BlockScope scope)671 public boolean visit(JavadocSingleNameReference argument, BlockScope scope) { 672 return true; // do nothing by default, keep traversing 673 } visit(JavadocSingleTypeReference typeRef, BlockScope scope)674 public boolean visit(JavadocSingleTypeReference typeRef, BlockScope scope) { 675 return true; // do nothing by default, keep traversing 676 } visit(LabeledStatement labeledStatement, BlockScope scope)677 public boolean visit(LabeledStatement labeledStatement, BlockScope scope) { 678 return true; // do nothing by default, keep traversing 679 } visit(LocalDeclaration localDeclaration, BlockScope scope)680 public boolean visit(LocalDeclaration localDeclaration, BlockScope scope) { 681 return true; // do nothing by default, keep traversing 682 } visit(LongLiteral longLiteral, BlockScope scope)683 public boolean visit(LongLiteral longLiteral, BlockScope scope) { 684 return true; // do nothing by default, keep traversing 685 } 686 /** 687 * @param annotation 688 * @param scope 689 * @since 3.1 690 */ visit(MarkerAnnotation annotation, BlockScope scope)691 public boolean visit(MarkerAnnotation annotation, BlockScope scope) { 692 return true; 693 } 694 /** 695 * @param annotation 696 * @param scope 697 * @since 3.1 698 */ visit(MarkerAnnotation annotation, ClassScope scope)699 public boolean visit(MarkerAnnotation annotation, ClassScope scope) { 700 return true; 701 } 702 /** 703 * @param annotation 704 * @param scope 705 * @since 3.1 706 */ visit(MarkerAnnotation annotation, CompilationUnitScope scope)707 public boolean visit(MarkerAnnotation annotation, CompilationUnitScope scope) { 708 return true; 709 } 710 /** 711 * @param pair 712 * @param scope 713 * @since 3.1 714 */ visit(MemberValuePair pair, BlockScope scope)715 public boolean visit(MemberValuePair pair, BlockScope scope) { 716 return true; 717 } 718 /** 719 * @param pair 720 * @param scope 721 * @since 3.1 722 */ visit(MemberValuePair pair, ClassScope scope)723 public boolean visit(MemberValuePair pair, ClassScope scope) { 724 return true; 725 } 726 /** 727 * @param pair 728 * @param scope 729 * @since 3.1 730 */ visit(MemberValuePair pair, CompilationUnitScope scope)731 public boolean visit(MemberValuePair pair, CompilationUnitScope scope) { 732 return true; 733 } visit(MessageSend messageSend, BlockScope scope)734 public boolean visit(MessageSend messageSend, BlockScope scope) { 735 return true; // do nothing by default, keep traversing 736 } visit(MethodDeclaration methodDeclaration, ClassScope scope)737 public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) { 738 return true; // do nothing by default, keep traversing 739 } visit( StringLiteralConcatenation literal, BlockScope scope)740 public boolean visit( 741 StringLiteralConcatenation literal, 742 BlockScope scope) { 743 return true; // do nothing by default, keep traversing 744 } 745 /** 746 * @param annotation 747 * @param scope 748 * @since 3.1 749 */ visit(NormalAnnotation annotation, BlockScope scope)750 public boolean visit(NormalAnnotation annotation, BlockScope scope) { 751 return true; 752 } 753 /** 754 * @param annotation 755 * @param scope 756 * @since 3.1 757 */ visit(NormalAnnotation annotation, ClassScope scope)758 public boolean visit(NormalAnnotation annotation, ClassScope scope) { 759 return true; 760 } 761 /** 762 * @param annotation 763 * @param scope 764 * @since 3.1 765 */ visit(NormalAnnotation annotation, CompilationUnitScope scope)766 public boolean visit(NormalAnnotation annotation, CompilationUnitScope scope) { 767 return true; 768 } visit(NullLiteral nullLiteral, BlockScope scope)769 public boolean visit(NullLiteral nullLiteral, BlockScope scope) { 770 return true; // do nothing by default, keep traversing 771 } visit(OR_OR_Expression or_or_Expression, BlockScope scope)772 public boolean visit(OR_OR_Expression or_or_Expression, BlockScope scope) { 773 return true; // do nothing by default, keep traversing 774 } visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope)775 public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) { 776 return true; // do nothing by default, keep traversing 777 } visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope)778 public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) { 779 return true; // do nothing by default, keep traversing 780 } visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope)781 public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) { 782 return true; // do nothing by default, keep traversing 783 } visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope)784 public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) { 785 return true; // do nothing by default, keep traversing 786 } visit(PostfixExpression postfixExpression, BlockScope scope)787 public boolean visit(PostfixExpression postfixExpression, BlockScope scope) { 788 return true; // do nothing by default, keep traversing 789 } visit(PrefixExpression prefixExpression, BlockScope scope)790 public boolean visit(PrefixExpression prefixExpression, BlockScope scope) { 791 return true; // do nothing by default, keep traversing 792 } visit( QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope)793 public boolean visit( 794 QualifiedAllocationExpression qualifiedAllocationExpression, 795 BlockScope scope) { 796 return true; // do nothing by default, keep traversing 797 } visit( QualifiedNameReference qualifiedNameReference, BlockScope scope)798 public boolean visit( 799 QualifiedNameReference qualifiedNameReference, 800 BlockScope scope) { 801 return true; // do nothing by default, keep traversing 802 } visit( QualifiedSuperReference qualifiedSuperReference, BlockScope scope)803 public boolean visit( 804 QualifiedSuperReference qualifiedSuperReference, 805 BlockScope scope) { 806 return true; // do nothing by default, keep traversing 807 } visit( QualifiedThisReference qualifiedThisReference, BlockScope scope)808 public boolean visit( 809 QualifiedThisReference qualifiedThisReference, 810 BlockScope scope) { 811 return true; // do nothing by default, keep traversing 812 } visit( QualifiedTypeReference qualifiedTypeReference, BlockScope scope)813 public boolean visit( 814 QualifiedTypeReference qualifiedTypeReference, 815 BlockScope scope) { 816 return true; // do nothing by default, keep traversing 817 } visit( QualifiedTypeReference qualifiedTypeReference, ClassScope scope)818 public boolean visit( 819 QualifiedTypeReference qualifiedTypeReference, 820 ClassScope scope) { 821 return true; // do nothing by default, keep traversing 822 } visit(ReturnStatement returnStatement, BlockScope scope)823 public boolean visit(ReturnStatement returnStatement, BlockScope scope) { 824 return true; // do nothing by default, keep traversing 825 } 826 /** 827 * @param annotation 828 * @param scope 829 * @since 3.1 830 */ visit(SingleMemberAnnotation annotation, BlockScope scope)831 public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) { 832 return true; 833 } 834 /** 835 * @param annotation 836 * @param scope 837 * @since 3.1 838 */ visit(SingleMemberAnnotation annotation, ClassScope scope)839 public boolean visit(SingleMemberAnnotation annotation, ClassScope scope) { 840 return true; 841 } 842 /** 843 * @param annotation 844 * @param scope 845 * @since 3.1 846 */ visit(SingleMemberAnnotation annotation, CompilationUnitScope scope)847 public boolean visit(SingleMemberAnnotation annotation, CompilationUnitScope scope) { 848 return true; 849 } visit( SingleNameReference singleNameReference, BlockScope scope)850 public boolean visit( 851 SingleNameReference singleNameReference, 852 BlockScope scope) { 853 return true; // do nothing by default, keep traversing 854 } visit( SingleTypeReference singleTypeReference, BlockScope scope)855 public boolean visit( 856 SingleTypeReference singleTypeReference, 857 BlockScope scope) { 858 return true; // do nothing by default, keep traversing 859 } visit( SingleTypeReference singleTypeReference, ClassScope scope)860 public boolean visit( 861 SingleTypeReference singleTypeReference, 862 ClassScope scope) { 863 return true; // do nothing by default, keep traversing 864 } visit(StringLiteral stringLiteral, BlockScope scope)865 public boolean visit(StringLiteral stringLiteral, BlockScope scope) { 866 return true; // do nothing by default, keep traversing 867 } visit(SuperReference superReference, BlockScope scope)868 public boolean visit(SuperReference superReference, BlockScope scope) { 869 return true; // do nothing by default, keep traversing 870 } visit(SwitchStatement switchStatement, BlockScope scope)871 public boolean visit(SwitchStatement switchStatement, BlockScope scope) { 872 return true; // do nothing by default, keep traversing 873 } visit( SynchronizedStatement synchronizedStatement, BlockScope scope)874 public boolean visit( 875 SynchronizedStatement synchronizedStatement, 876 BlockScope scope) { 877 return true; // do nothing by default, keep traversing 878 } visit(ThisReference thisReference, BlockScope scope)879 public boolean visit(ThisReference thisReference, BlockScope scope) { 880 return true; // do nothing by default, keep traversing 881 } visit(ThrowStatement throwStatement, BlockScope scope)882 public boolean visit(ThrowStatement throwStatement, BlockScope scope) { 883 return true; // do nothing by default, keep traversing 884 } visit(TrueLiteral trueLiteral, BlockScope scope)885 public boolean visit(TrueLiteral trueLiteral, BlockScope scope) { 886 return true; // do nothing by default, keep traversing 887 } visit(TryStatement tryStatement, BlockScope scope)888 public boolean visit(TryStatement tryStatement, BlockScope scope) { 889 return true; // do nothing by default, keep traversing 890 } visit( TypeDeclaration localTypeDeclaration, BlockScope scope)891 public boolean visit( 892 TypeDeclaration localTypeDeclaration, 893 BlockScope scope) { 894 return true; // do nothing by default, keep traversing 895 } visit( TypeDeclaration memberTypeDeclaration, ClassScope scope)896 public boolean visit( 897 TypeDeclaration memberTypeDeclaration, 898 ClassScope scope) { 899 return true; // do nothing by default, keep traversing 900 } visit( TypeDeclaration typeDeclaration, CompilationUnitScope scope)901 public boolean visit( 902 TypeDeclaration typeDeclaration, 903 CompilationUnitScope scope) { 904 return true; // do nothing by default, keep traversing 905 } visit(TypeParameter typeParameter, BlockScope scope)906 public boolean visit(TypeParameter typeParameter, BlockScope scope) { 907 return true; // do nothing by default, keep traversing 908 } visit(TypeParameter typeParameter, ClassScope scope)909 public boolean visit(TypeParameter typeParameter, ClassScope scope) { 910 return true; // do nothing by default, keep traversing 911 } visit(UnaryExpression unaryExpression, BlockScope scope)912 public boolean visit(UnaryExpression unaryExpression, BlockScope scope) { 913 return true; // do nothing by default, keep traversing 914 } visit(WhileStatement whileStatement, BlockScope scope)915 public boolean visit(WhileStatement whileStatement, BlockScope scope) { 916 return true; // do nothing by default, keep traversing 917 } visit(Wildcard wildcard, BlockScope scope)918 public boolean visit(Wildcard wildcard, BlockScope scope) { 919 return true; // do nothing by default, keep traversing 920 } visit(Wildcard wildcard, ClassScope scope)921 public boolean visit(Wildcard wildcard, ClassScope scope) { 922 return true; // do nothing by default, keep traversing 923 } 924 } 925