|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JavaAstVisitor
An AST Visitor interface for visiting every Java-type node.
Method Summary | |
---|---|
void |
endVisit(AllocationExpression allocationExpression,
BlockScope scope)
|
void |
endVisit(AND_AND_Expression and_and_Expression,
BlockScope scope)
|
void |
endVisit(AnnotationMethodDeclaration annotationTypeDeclaration,
ClassScope classScope)
|
void |
endVisit(Argument argument,
BlockScope scope)
|
void |
endVisit(Argument argument,
ClassScope scope)
|
void |
endVisit(ArrayAllocationExpression arrayAllocationExpression,
BlockScope scope)
|
void |
endVisit(ArrayInitializer arrayInitializer,
BlockScope scope)
|
void |
endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
BlockScope scope)
|
void |
endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
ClassScope scope)
|
void |
endVisit(ArrayReference arrayReference,
BlockScope scope)
|
void |
endVisit(ArrayTypeReference arrayTypeReference,
BlockScope scope)
|
void |
endVisit(ArrayTypeReference arrayTypeReference,
ClassScope scope)
|
void |
endVisit(AssertStatement assertStatement,
BlockScope scope)
|
void |
endVisit(Assignment assignment,
BlockScope scope)
|
void |
endVisit(BinaryExpression binaryExpression,
BlockScope scope)
|
void |
endVisit(Block block,
BlockScope scope)
|
void |
endVisit(BreakStatement breakStatement,
BlockScope scope)
|
void |
endVisit(CaseStatement caseStatement,
BlockScope scope)
|
void |
endVisit(CastExpression castExpression,
BlockScope scope)
|
void |
endVisit(CharLiteral charLiteral,
BlockScope scope)
|
void |
endVisit(ClassLiteralAccess classLiteral,
BlockScope scope)
|
void |
endVisit(Clinit clinit,
ClassScope scope)
|
void |
endVisit(CombinedBinaryExpression combinedBinaryExpression,
BlockScope scope)
|
void |
endVisit(CompilationUnitDeclaration compilationUnitDeclaration,
CompilationUnitScope scope)
|
void |
endVisit(CompoundAssignment compoundAssignment,
BlockScope scope)
|
void |
endVisit(ConditionalExpression conditionalExpression,
BlockScope scope)
|
void |
endVisit(ConstructorDeclaration constructorDeclaration,
ClassScope scope)
|
void |
endVisit(ContinueStatement continueStatement,
BlockScope scope)
|
void |
endVisit(DoStatement doStatement,
BlockScope scope)
|
void |
endVisit(DoubleLiteral doubleLiteral,
BlockScope scope)
|
void |
endVisit(EmptyStatement emptyStatement,
BlockScope scope)
|
void |
endVisit(EqualExpression equalExpression,
BlockScope scope)
|
void |
endVisit(ExplicitConstructorCall explicitConstructor,
BlockScope scope)
|
void |
endVisit(ExtendedStringLiteral extendedStringLiteral,
BlockScope scope)
|
void |
endVisit(FalseLiteral falseLiteral,
BlockScope scope)
|
void |
endVisit(FieldDeclaration fieldDeclaration,
MethodScope scope)
|
void |
endVisit(FieldReference fieldReference,
BlockScope scope)
|
void |
endVisit(FieldReference fieldReference,
ClassScope scope)
|
void |
endVisit(FloatLiteral floatLiteral,
BlockScope scope)
|
void |
endVisit(ForeachStatement forStatement,
BlockScope scope)
|
void |
endVisit(ForStatement forStatement,
BlockScope scope)
|
void |
endVisit(IfStatement ifStatement,
BlockScope scope)
|
void |
endVisit(ImportReference importRef,
CompilationUnitScope scope)
|
void |
endVisit(Initializer initializer,
MethodScope scope)
|
void |
endVisit(InstanceOfExpression instanceOfExpression,
BlockScope scope)
|
void |
endVisit(IntLiteral intLiteral,
BlockScope scope)
|
void |
endVisit(LabeledStatement labeledStatement,
BlockScope scope)
|
void |
endVisit(LocalDeclaration localDeclaration,
BlockScope scope)
|
void |
endVisit(LongLiteral longLiteral,
BlockScope scope)
|
void |
endVisit(MarkerAnnotation annotation,
BlockScope scope)
|
void |
endVisit(MemberValuePair pair,
BlockScope scope)
|
void |
endVisit(MessageSend messageSend,
BlockScope scope)
|
void |
endVisit(MethodDeclaration methodDeclaration,
ClassScope scope)
|
void |
endVisit(NormalAnnotation annotation,
BlockScope scope)
|
void |
endVisit(NullLiteral nullLiteral,
BlockScope scope)
|
void |
endVisit(OR_OR_Expression or_or_Expression,
BlockScope scope)
|
void |
endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
BlockScope scope)
|
void |
endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
ClassScope scope)
|
void |
endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
BlockScope scope)
|
void |
endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
ClassScope scope)
|
void |
endVisit(PostfixExpression postfixExpression,
BlockScope scope)
|
void |
endVisit(PrefixExpression prefixExpression,
BlockScope scope)
|
void |
endVisit(QualifiedAllocationExpression qualifiedAllocationExpression,
BlockScope scope)
|
void |
endVisit(QualifiedNameReference qualifiedNameReference,
BlockScope scope)
|
void |
endVisit(QualifiedNameReference qualifiedNameReference,
ClassScope scope)
|
void |
endVisit(QualifiedSuperReference qualifiedSuperReference,
BlockScope scope)
|
void |
endVisit(QualifiedSuperReference qualifiedSuperReference,
ClassScope scope)
|
void |
endVisit(QualifiedThisReference qualifiedThisReference,
BlockScope scope)
|
void |
endVisit(QualifiedThisReference qualifiedThisReference,
ClassScope scope)
|
void |
endVisit(QualifiedTypeReference qualifiedTypeReference,
BlockScope scope)
|
void |
endVisit(QualifiedTypeReference qualifiedTypeReference,
ClassScope scope)
|
void |
endVisit(ReturnStatement returnStatement,
BlockScope scope)
|
void |
endVisit(SingleMemberAnnotation annotation,
BlockScope scope)
|
void |
endVisit(SingleNameReference singleNameReference,
BlockScope scope)
|
void |
endVisit(SingleNameReference singleNameReference,
ClassScope scope)
|
void |
endVisit(SingleTypeReference singleTypeReference,
BlockScope scope)
|
void |
endVisit(SingleTypeReference singleTypeReference,
ClassScope scope)
|
void |
endVisit(StringLiteral stringLiteral,
BlockScope scope)
|
void |
endVisit(StringLiteralConcatenation literal,
BlockScope scope)
|
void |
endVisit(SuperReference superReference,
BlockScope scope)
|
void |
endVisit(SwitchStatement switchStatement,
BlockScope scope)
|
void |
endVisit(SynchronizedStatement synchronizedStatement,
BlockScope scope)
|
void |
endVisit(ThisReference thisReference,
BlockScope scope)
|
void |
endVisit(ThisReference thisReference,
ClassScope scope)
|
void |
endVisit(ThrowStatement throwStatement,
BlockScope scope)
|
void |
endVisit(TrueLiteral trueLiteral,
BlockScope scope)
|
void |
endVisit(TryStatement tryStatement,
BlockScope scope)
|
void |
endVisit(TypeDeclaration localTypeDeclaration,
BlockScope scope)
|
void |
endVisit(TypeDeclaration memberTypeDeclaration,
ClassScope scope)
|
void |
endVisit(TypeDeclaration typeDeclaration,
CompilationUnitScope scope)
|
void |
endVisit(TypeParameter typeParameter,
BlockScope scope)
|
void |
endVisit(TypeParameter typeParameter,
ClassScope scope)
|
void |
endVisit(UnaryExpression unaryExpression,
BlockScope scope)
|
void |
endVisit(WhileStatement whileStatement,
BlockScope scope)
|
void |
endVisit(Wildcard wildcard,
BlockScope scope)
|
void |
endVisit(Wildcard wildcard,
ClassScope scope)
|
boolean |
visit(AllocationExpression allocationExpression,
BlockScope scope)
Used to allocate new objects. |
boolean |
visit(AND_AND_Expression and_and_Expression,
BlockScope scope)
Expressions separated by the 'AND' operator. |
boolean |
visit(AnnotationMethodDeclaration annotationTypeDeclaration,
ClassScope classScope)
|
boolean |
visit(Argument argument,
BlockScope scope)
Examples include: |
boolean |
visit(Argument argument,
ClassScope scope)
|
boolean |
visit(ArrayAllocationExpression arrayAllocationExpression,
BlockScope scope)
An allocation expression that contains square brackets to create an array. |
boolean |
visit(ArrayInitializer arrayInitializer,
BlockScope scope)
Expression that contains elements with different initial values, at the end of the allocation expression. |
boolean |
visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
BlockScope scope)
An array type which has a fully qualified name/type associated with it. |
boolean |
visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
ClassScope scope)
|
boolean |
visit(ArrayReference arrayReference,
BlockScope scope)
Referencing a particular array location. |
boolean |
visit(ArrayTypeReference arrayTypeReference,
BlockScope scope)
Referencing an array type. |
boolean |
visit(ArrayTypeReference arrayTypeReference,
ClassScope scope)
|
boolean |
visit(AssertStatement assertStatement,
BlockScope scope)
Statement that is used to test an assumption is true or false. |
boolean |
visit(Assignment assignment,
BlockScope scope)
Statement that assigns a value to another variable. |
boolean |
visit(BinaryExpression binaryExpression,
BlockScope scope)
Expressions containing left and right expressions combined by a binary operator. |
boolean |
visit(Block block,
BlockScope scope)
Sequence of statements within braces. |
boolean |
visit(BreakStatement breakStatement,
BlockScope scope)
Used to transfer control out of an enclosing statement. |
boolean |
visit(CaseStatement caseStatement,
BlockScope scope)
Examples include: |
boolean |
visit(CastExpression castExpression,
BlockScope scope)
Expression that converts one type to the other type. |
boolean |
visit(CharLiteral charLiteral,
BlockScope scope)
Is a representation of a fixed value of type char. |
boolean |
visit(ClassLiteralAccess classLiteral,
BlockScope scope)
An expression consisting of the name of a class, interface, array, or primitive type followed by `.' and the token class. |
boolean |
visit(Clinit clinit,
ClassScope scope)
Class and interface initialization method that are called implicitly by the Java Virtual Machine. |
boolean |
visit(CombinedBinaryExpression combinedBinaryExpression,
BlockScope scope)
|
boolean |
visit(CompilationUnitDeclaration compilationUnitDeclaration,
CompilationUnitScope scope)
|
boolean |
visit(CompoundAssignment compoundAssignment,
BlockScope scope)
Assignment statements which compute and assign at the same time. |
boolean |
visit(ConditionalExpression conditionalExpression,
BlockScope scope)
A compound expression that contains a condition, an expression to be evaluated if the condition evaluates to true, and an expression to be evaluated if the condition has the value false. |
boolean |
visit(ConstructorDeclaration constructorDeclaration,
ClassScope scope)
A method declaration which is a constructor. |
boolean |
visit(ContinueStatement continueStatement,
BlockScope scope)
Passes control to the loop-continuation point of an iteration statement. |
boolean |
visit(DoStatement doStatement,
BlockScope scope)
Iterative statement that iterates atleast once. |
boolean |
visit(DoubleLiteral doubleLiteral,
BlockScope scope)
Literal signifying a double type. |
boolean |
visit(EmptyStatement emptyStatement,
BlockScope scope)
Statement that performs no action and obviously has no effect. |
boolean |
visit(EqualExpression equalExpression,
BlockScope scope)
Expression that checks for equality. |
boolean |
visit(ExplicitConstructorCall explicitConstructor,
BlockScope scope)
A constructor call that calls a parameterized constructor instead of the default constructor. |
boolean |
visit(ExtendedStringLiteral extendedStringLiteral,
BlockScope scope)
Occurs when two or more string literals are concatenated. |
boolean |
visit(FalseLiteral falseLiteral,
BlockScope scope)
Expression that contains a false literal. |
boolean |
visit(FieldDeclaration fieldDeclaration,
MethodScope scope)
Examples include: |
boolean |
visit(FieldReference fieldReference,
BlockScope scope)
Referencing a field of a class. |
boolean |
visit(FieldReference fieldReference,
ClassScope scope)
|
boolean |
visit(FloatLiteral floatLiteral,
BlockScope scope)
Literal signifying a float type. |
boolean |
visit(ForeachStatement forStatement,
BlockScope scope)
Enhanced version of the for loop to make iteration over arrays and other collections more convenient. |
boolean |
visit(ForStatement forStatement,
BlockScope scope)
Provides a compact-form to iterate over a range of values. |
boolean |
visit(IfStatement ifStatement,
BlockScope scope)
Control-flow statement that executes a portion of code only if condition is evaluated to true. |
boolean |
visit(ImportReference importRef,
CompilationUnitScope scope)
Statement used to reference classes and interfaces declared in other packages. |
boolean |
visit(Initializer initializer,
MethodScope scope)
A normal block of code used to initialize fields. |
boolean |
visit(InstanceOfExpression instanceOfExpression,
BlockScope scope)
Expression containing the instanceof operator. |
boolean |
visit(IntLiteral intLiteral,
BlockScope scope)
Literal signifying integer type. |
boolean |
visit(LabeledStatement labeledStatement,
BlockScope scope)
A statement which has a label followed by statements. |
boolean |
visit(LocalDeclaration localDeclaration,
BlockScope scope)
Declaration within a method body. |
boolean |
visit(LongLiteral longLiteral,
BlockScope scope)
Literal that are of long type. |
boolean |
visit(MarkerAnnotation annotation,
BlockScope scope)
|
boolean |
visit(MemberValuePair pair,
BlockScope scope)
|
boolean |
visit(MessageSend messageSend,
BlockScope scope)
Calling a method. |
boolean |
visit(MethodDeclaration methodDeclaration,
ClassScope scope)
Declaration of a method. |
boolean |
visit(NormalAnnotation annotation,
BlockScope scope)
|
boolean |
visit(NullLiteral nullLiteral,
BlockScope scope)
Expression that contains the null keyword. |
boolean |
visit(OR_OR_Expression or_or_Expression,
BlockScope scope)
Expressions that contain an 'or' short-circuit operator. |
boolean |
visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
BlockScope scope)
Specifying a particular type (fully qualified name) at compile time to allow a specific, single object. |
boolean |
visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
ClassScope scope)
|
boolean |
visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
BlockScope scope)
Specifying a particular type at compile time to allow a specific, single object. |
boolean |
visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
ClassScope scope)
|
boolean |
visit(PostfixExpression postfixExpression,
BlockScope scope)
Expressions involving prefix operators. |
boolean |
visit(PrefixExpression prefixExpression,
BlockScope scope)
Expressions involving prefix operators. |
boolean |
visit(QualifiedAllocationExpression qualifiedAllocationExpression,
BlockScope scope)
Allocation of an anonymous Type. |
boolean |
visit(QualifiedNameReference qualifiedNameReference,
BlockScope scope)
Referencing a name using full qualified name. |
boolean |
visit(QualifiedNameReference qualifiedNameReference,
ClassScope scope)
|
boolean |
visit(QualifiedSuperReference qualifiedSuperReference,
BlockScope scope)
Is used in a subclass to access overridden/inherited methods using fully qualified name. |
boolean |
visit(QualifiedSuperReference qualifiedSuperReference,
ClassScope scope)
|
boolean |
visit(QualifiedThisReference qualifiedThisReference,
BlockScope scope)
Referencing to the current object using fully qualified name Ñ the object whose method or constructor is being called. |
boolean |
visit(QualifiedThisReference qualifiedThisReference,
ClassScope scope)
|
boolean |
visit(QualifiedTypeReference qualifiedTypeReference,
BlockScope scope)
Referencing a particular type with fully qualified name. |
boolean |
visit(QualifiedTypeReference qualifiedTypeReference,
ClassScope scope)
|
boolean |
visit(ReturnStatement returnStatement,
BlockScope scope)
Statement that returns a value from a method. |
boolean |
visit(SingleMemberAnnotation annotation,
BlockScope scope)
|
boolean |
visit(SingleNameReference singleNameReference,
BlockScope scope)
|
boolean |
visit(SingleNameReference singleNameReference,
ClassScope scope)
|
boolean |
visit(SingleTypeReference singleTypeReference,
BlockScope scope)
Referencing a type. |
boolean |
visit(SingleTypeReference singleTypeReference,
ClassScope scope)
|
boolean |
visit(StringLiteral stringLiteral,
BlockScope scope)
Anything enclosed within double-quotes. |
boolean |
visit(StringLiteralConcatenation literal,
BlockScope scope)
|
boolean |
visit(SuperReference superReference,
BlockScope scope)
Used in the definitions of instance methods. |
boolean |
visit(SwitchStatement switchStatement,
BlockScope scope)
A statement involving switch-case block. |
boolean |
visit(SynchronizedStatement synchronizedStatement,
BlockScope scope)
Used to acquire a mutual-exclusion lock on behalf of the executing thread, executes a block, then releases the lock. |
boolean |
visit(ThisReference thisReference,
BlockScope scope)
A reference to the current object Ñ the object whose method or constructor is being called. |
boolean |
visit(ThisReference thisReference,
ClassScope scope)
|
boolean |
visit(ThrowStatement throwStatement,
BlockScope scope)
Used to throw an exception. |
boolean |
visit(TrueLiteral trueLiteral,
BlockScope scope)
Expression that contains the true keyword. |
boolean |
visit(TryStatement tryStatement,
BlockScope scope)
Statement denoting a try-catch block. |
boolean |
visit(TypeDeclaration localTypeDeclaration,
BlockScope scope)
Declaring an inner type within a method body. |
boolean |
visit(TypeDeclaration memberTypeDeclaration,
ClassScope scope)
Declaring an inner type within a class/interface. |
boolean |
visit(TypeDeclaration typeDeclaration,
CompilationUnitScope scope)
|
boolean |
visit(TypeParameter typeParameter,
BlockScope scope)
|
boolean |
visit(TypeParameter typeParameter,
ClassScope scope)
|
boolean |
visit(UnaryExpression unaryExpression,
BlockScope scope)
Expressions having unary operators. |
boolean |
visit(WhileStatement whileStatement,
BlockScope scope)
A loop that is continuously iterated while the a particular condition is true. |
boolean |
visit(Wildcard wildcard,
BlockScope scope)
|
boolean |
visit(Wildcard wildcard,
ClassScope scope)
|
Method Detail |
---|
boolean visit(AllocationExpression allocationExpression, BlockScope scope)
new Foo(); new String[5];
void endVisit(AllocationExpression allocationExpression, BlockScope scope)
AllocationExpression
boolean visit(AND_AND_Expression and_and_Expression, BlockScope scope)
true && false a == 2 && m()
void endVisit(AND_AND_Expression and_and_Expression, BlockScope scope)
AND_AND_Expression
boolean visit(AnnotationMethodDeclaration annotationTypeDeclaration, ClassScope classScope)
void endVisit(AnnotationMethodDeclaration annotationTypeDeclaration, ClassScope classScope)
boolean visit(Argument argument, BlockScope scope)
m(int a) { ... } void foo(int a, String b) { ... }In this example, anything inside the first bracket is termed as an argument ie. int a and int a, String b are arguments.
void endVisit(Argument argument, BlockScope scope)
Argument
boolean visit(Argument argument, ClassScope scope)
Argument
void endVisit(Argument argument, ClassScope scope)
Argument
boolean visit(ArrayAllocationExpression arrayAllocationExpression, BlockScope scope)
new int[3][4]; new int[4][][];
void endVisit(ArrayAllocationExpression arrayAllocationExpression, BlockScope scope)
ArrayAllocationExpression
boolean visit(ArrayInitializer arrayInitializer, BlockScope scope)
void endVisit(ArrayInitializer arrayInitializer, BlockScope scope)
ArrayInitializer
boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope)
java.lang.String[] x;In this example, java.lang.String[] is an ArrayQualifiedTypeReference
void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope)
ArrayQualifiedTypeReference
boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope)
ArrayQualifiedTypeReference
void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope)
ArrayQualifiedTypeReference
boolean visit(ArrayReference arrayReference, BlockScope scope)
var[0] var[i]
void endVisit(ArrayReference arrayReference, BlockScope scope)
;
boolean visit(ArrayTypeReference arrayTypeReference, BlockScope scope)
String[] int[] Object[]
void endVisit(ArrayTypeReference arrayTypeReference, BlockScope scope)
ArrayTypeReference
boolean visit(ArrayTypeReference arrayTypeReference, ClassScope scope)
ArrayTypeReference
void endVisit(ArrayTypeReference arrayTypeReference, ClassScope scope)
ArrayTypeReference
boolean visit(AssertStatement assertStatement, BlockScope scope)
assert a == b; assert !true;
void endVisit(AssertStatement assertStatement, BlockScope scope)
AssertStatement
boolean visit(Assignment assignment, BlockScope scope)
a = 2; b = new Foo();
void endVisit(Assignment assignment, BlockScope scope)
Assignment
boolean visit(BinaryExpression binaryExpression, BlockScope scope)
a + b "a" + "b" k - 2
void endVisit(BinaryExpression binaryExpression, BlockScope scope)
BinaryExpression
boolean visit(Block block, BlockScope scope)
{ ... }
void endVisit(Block block, BlockScope scope)
Block
boolean visit(BreakStatement breakStatement, BlockScope scope)
break; break la;
void endVisit(BreakStatement breakStatement, BlockScope scope)
BreakStatement
boolean visit(CaseStatement caseStatement, BlockScope scope)
case 1: ... case 'a': ...
void endVisit(CaseStatement caseStatement, BlockScope scope)
CaseStatement
boolean visit(CastExpression castExpression, BlockScope scope)
(Object) o (java.lang.String) sIn this example, (Object) and (java.lang.String) are cast expressions.
void endVisit(CastExpression castExpression, BlockScope scope)
CastExpression
boolean visit(CharLiteral charLiteral, BlockScope scope)
'A' '\b'
void endVisit(CharLiteral charLiteral, BlockScope scope)
CharLiteral
boolean visit(ClassLiteralAccess classLiteral, BlockScope scope)
String.class
void endVisit(ClassLiteralAccess classLiteral, BlockScope scope)
ClassLiteralAccess
boolean visit(Clinit clinit, ClassScope scope)
The example shown above, is actually a synthetic method, added by the compiler.(){ }
void endVisit(Clinit clinit, ClassScope scope)
Clinit
boolean visit(CompilationUnitDeclaration compilationUnitDeclaration, CompilationUnitScope scope)
void endVisit(CompilationUnitDeclaration compilationUnitDeclaration, CompilationUnitScope scope)
boolean visit(CompoundAssignment compoundAssignment, BlockScope scope)
a += b; z |= x;
void endVisit(CompoundAssignment compoundAssignment, BlockScope scope)
CompoundAssignment
boolean visit(ConditionalExpression conditionalExpression, BlockScope scope)
s? true: false;
void endVisit(ConditionalExpression conditionalExpression, BlockScope scope)
ConditionalExpression
boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope scope)
A(int a) { ... } A() { ... }
void endVisit(ConstructorDeclaration constructorDeclaration, ClassScope scope)
ConstructorDeclaration
boolean visit(ContinueStatement continueStatement, BlockScope scope)
while(e){ ... if (true) continue; ... } ed: for(;;) { if (i==j) continue ed; else ... }In this example, continue; and continue ed; are Continue statements.
void endVisit(ContinueStatement continueStatement, BlockScope scope)
ContinueStatement
boolean visit(DoStatement doStatement, BlockScope scope)
do { ... } while ( ... );
void endVisit(DoStatement doStatement, BlockScope scope)
DoStatement
boolean visit(DoubleLiteral doubleLiteral, BlockScope scope)
double d = 1.223; double ds = 0.1d;
void endVisit(DoubleLiteral doubleLiteral, BlockScope scope)
DoubleLiteral
boolean visit(EmptyStatement emptyStatement, BlockScope scope)
;
void endVisit(EmptyStatement emptyStatement, BlockScope scope)
EmptyStatement
boolean visit(EqualExpression equalExpression, BlockScope scope)
a == b a == null
void endVisit(EqualExpression equalExpression, BlockScope scope)
EqualExpression
boolean visit(ExplicitConstructorCall explicitConstructor, BlockScope scope)
public Foo{ Foo(){} Foo(int a, int b){} public static void main(String args[]){ Foo n = new Foo(1,2); } }In this example, Foo(int a, int b){} is an ExplicitConstructorCall.
void endVisit(ExplicitConstructorCall explicitConstructor, BlockScope scope)
ExplicitConstructorCall
boolean visit(ExtendedStringLiteral extendedStringLiteral, BlockScope scope)
"a" + "b" "a" + "b" + "C"
void endVisit(ExtendedStringLiteral extendedStringLiteral, BlockScope scope)
ExtendedStringLiteral
boolean visit(FalseLiteral falseLiteral, BlockScope scope)
false
void endVisit(FalseLiteral falseLiteral, BlockScope scope)
FalseLiteral
boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope)
class A{ int a; Object o = new Object(); }In this example, int a; is a FieldDeclaration.
void endVisit(FieldDeclaration fieldDeclaration, MethodScope scope)
FieldDeclaration
boolean visit(FieldReference fieldReference, BlockScope scope)
this.field = ...In this example, this.field is the FieldReference.
void endVisit(FieldReference fieldReference, BlockScope scope)
FieldReference
boolean visit(FieldReference fieldReference, ClassScope scope)
FieldReference
void endVisit(FieldReference fieldReference, ClassScope scope)
FieldReference
boolean visit(FloatLiteral floatLiteral, BlockScope scope)
.12 0.11
void endVisit(FloatLiteral floatLiteral, BlockScope scope)
;
boolean visit(ForeachStatement forStatement, BlockScope scope)
for (String s: x) { ... }
void endVisit(ForeachStatement forStatement, BlockScope scope)
;
boolean visit(ForStatement forStatement, BlockScope scope)
for(int i = 0; i < 10; i++) { ... } for(i = 0; ; i++);
void endVisit(ForStatement forStatement, BlockScope scope)
;
boolean visit(IfStatement ifStatement, BlockScope scope)
if (true) { ... } if (expression) { ... } else if (expression) { ... } else { ... }
void endVisit(IfStatement ifStatement, BlockScope scope)
;
boolean visit(ImportReference importRef, CompilationUnitScope scope)
import packageName.*; import packageName.className;
void endVisit(ImportReference importRef, CompilationUnitScope scope)
;
boolean visit(Initializer initializer, MethodScope scope)
class A{ int a, b; { a = 1; b = 2; } ... }In this example, { a = 1; b = 2; } is an Initializer.
void endVisit(Initializer initializer, MethodScope scope)
;
boolean visit(InstanceOfExpression instanceOfExpression, BlockScope scope)
if ( o instance Object) { ... }In this example, o instanceof Objct is an InstanceOfExpression.
void endVisit(InstanceOfExpression instanceOfExpression, BlockScope scope)
;
boolean visit(IntLiteral intLiteral, BlockScope scope)
42 1
void endVisit(IntLiteral intLiteral, BlockScope scope)
;
boolean visit(LabeledStatement labeledStatement, BlockScope scope)
br : switch { ... } lbl : int a = 0;
void endVisit(LabeledStatement labeledStatement, BlockScope scope)
;
boolean visit(LocalDeclaration localDeclaration, BlockScope scope)
int a = 2; int d;
void endVisit(LocalDeclaration localDeclaration, BlockScope scope)
;
boolean visit(LongLiteral longLiteral, BlockScope scope)
long d = 22232;
void endVisit(LongLiteral longLiteral, BlockScope scope)
;
boolean visit(MarkerAnnotation annotation, BlockScope scope)
void endVisit(MarkerAnnotation annotation, BlockScope scope)
boolean visit(MemberValuePair pair, BlockScope scope)
void endVisit(MemberValuePair pair, BlockScope scope)
boolean visit(MessageSend messageSend, BlockScope scope)
m(a, b); X.m();
void endVisit(MessageSend messageSend, BlockScope scope)
;
boolean visit(MethodDeclaration methodDeclaration, ClassScope scope)
private void a(){ ... } void b(int d){ ... }
void endVisit(MethodDeclaration methodDeclaration, ClassScope scope)
;
boolean visit(StringLiteralConcatenation literal, BlockScope scope)
void endVisit(StringLiteralConcatenation literal, BlockScope scope)
boolean visit(NormalAnnotation annotation, BlockScope scope)
void endVisit(NormalAnnotation annotation, BlockScope scope)
boolean visit(NullLiteral nullLiteral, BlockScope scope)
null
void endVisit(NullLiteral nullLiteral, BlockScope scope)
;
boolean visit(OR_OR_Expression or_or_Expression, BlockScope scope)
true || false a == 2 || m()
void endVisit(OR_OR_Expression or_or_Expression, BlockScope scope)
;
boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope)
new java.util.ArrayListIn this example, java.util.ArrayList();
void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope)
;
boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope)
;
void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope)
;
boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope)
new ArrayListIn this example, ArrayList();
void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope)
;
boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope)
;
void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope)
;
boolean visit(PostfixExpression postfixExpression, BlockScope scope)
x++ x--
void endVisit(PostfixExpression postfixExpression, BlockScope scope)
;
boolean visit(PrefixExpression prefixExpression, BlockScope scope)
++x --x
void endVisit(PrefixExpression prefixExpression, BlockScope scope)
;
boolean visit(QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope)
new Object() { ... }
void endVisit(QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope)
;
boolean visit(QualifiedNameReference qualifiedNameReference, BlockScope scope)
X.a = 1;In this example, X.a is a QualifiedNameReference
void endVisit(QualifiedNameReference qualifiedNameReference, BlockScope scope)
;
boolean visit(QualifiedNameReference qualifiedNameReference, ClassScope scope)
;
void endVisit(QualifiedNameReference qualifiedNameReference, ClassScope scope)
;
boolean visit(QualifiedSuperReference qualifiedSuperReference, BlockScope scope)
X.super.m();In this example, X.super.m() is a QualifiedSuperReference.
void endVisit(QualifiedSuperReference qualifiedSuperReference, BlockScope scope)
;
boolean visit(QualifiedSuperReference qualifiedSuperReference, ClassScope scope)
;
void endVisit(QualifiedSuperReference qualifiedSuperReference, ClassScope scope)
;
boolean visit(QualifiedThisReference qualifiedThisReference, BlockScope scope)
X.this.d = x;In this example, X.this.d is a QualifiedThisReference.
void endVisit(QualifiedThisReference qualifiedThisReference, BlockScope scope)
;
boolean visit(QualifiedThisReference qualifiedThisReference, ClassScope scope)
;
void endVisit(QualifiedThisReference qualifiedThisReference, ClassScope scope)
;
boolean visit(QualifiedTypeReference qualifiedTypeReference, BlockScope scope)
java.lang.String s = ... ; Y.Z z = new Y.Z();In this example, java.lang.String and Y.Z is a QualifiedTypeReference.
void endVisit(QualifiedTypeReference qualifiedTypeReference, BlockScope scope)
;
boolean visit(QualifiedTypeReference qualifiedTypeReference, ClassScope scope)
;
void endVisit(QualifiedTypeReference qualifiedTypeReference, ClassScope scope)
;
boolean visit(ReturnStatement returnStatement, BlockScope scope)
return ; return a; return new String("aa");In this example, return, return a, return new String("aa") is a ReturnStatement
void endVisit(ReturnStatement returnStatement, BlockScope scope)
;
boolean visit(SingleMemberAnnotation annotation, BlockScope scope)
void endVisit(SingleMemberAnnotation annotation, BlockScope scope)
boolean visit(SingleNameReference singleNameReference, BlockScope scope)
void endVisit(SingleNameReference singleNameReference, BlockScope scope)
boolean visit(SingleNameReference singleNameReference, ClassScope scope)
void endVisit(SingleNameReference singleNameReference, ClassScope scope)
boolean visit(SingleTypeReference singleTypeReference, BlockScope scope)
interface Y{ ... } class X implements Y { ... }In this example, Y in (implements Y) is a SingleTypeReference.
void endVisit(SingleTypeReference singleTypeReference, BlockScope scope)
;
boolean visit(SingleTypeReference singleTypeReference, ClassScope scope)
;
void endVisit(SingleTypeReference singleTypeReference, ClassScope scope)
;
boolean visit(StringLiteral stringLiteral, BlockScope scope)
"jml4"
void endVisit(StringLiteral stringLiteral, BlockScope scope)
;
boolean visit(SuperReference superReference, BlockScope scope)
super.m();In this example, super.m() is a SuperReference.
void endVisit(SuperReference superReference, BlockScope scope)
;
boolean visit(SwitchStatement switchStatement, BlockScope scope)
switch (i) { case 0: ... break; ... default: ... }In this example, switch(i) { ... } is a Switch Statement
void endVisit(SwitchStatement switchStatement, BlockScope scope)
;
boolean visit(SynchronizedStatement synchronizedStatement, BlockScope scope)
synchronized(t) { ... } synchronized(new T()) { ... }
void endVisit(SynchronizedStatement synchronizedStatement, BlockScope scope)
;
boolean visit(ThisReference thisReference, BlockScope scope)
this.x = x; this(0,0);In this example, this.x and this(0,0) is a ThisReference.
void endVisit(ThisReference thisReference, BlockScope scope)
;
boolean visit(ThisReference thisReference, ClassScope scope)
;
void endVisit(ThisReference thisReference, ClassScope scope)
;
boolean visit(ThrowStatement throwStatement, BlockScope scope)
throw someThrowableObject; throw new EmptyStackException();
void endVisit(ThrowStatement throwStatement, BlockScope scope)
;
boolean visit(TrueLiteral trueLiteral, BlockScope scope)
true
void endVisit(TrueLiteral trueLiteral, BlockScope scope)
;
boolean visit(TryStatement tryStatement, BlockScope scope)
try { ... } catch() { ... } try { ... } try { ... } finally { ... }
void endVisit(TryStatement tryStatement, BlockScope scope)
;
boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope)
void m() { class A { ... } }In this example, class A { ... } is a localTypeDeclaration.
void endVisit(TypeDeclaration localTypeDeclaration, BlockScope scope)
;
boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope)
class A{ class B{ } }In this example, class B { } is a memberTypeDeclaration
void endVisit(TypeDeclaration memberTypeDeclaration, ClassScope scope)
;
boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope)
void endVisit(TypeDeclaration typeDeclaration, CompilationUnitScope scope)
boolean visit(TypeParameter typeParameter, BlockScope scope)
void endVisit(TypeParameter typeParameter, BlockScope scope)
boolean visit(TypeParameter typeParameter, ClassScope scope)
void endVisit(TypeParameter typeParameter, ClassScope scope)
boolean visit(UnaryExpression unaryExpression, BlockScope scope)
++a !a ~a z++
void endVisit(UnaryExpression unaryExpression, BlockScope scope)
;
boolean visit(WhileStatement whileStatement, BlockScope scope)
while (e); while (expression) { ... }
void endVisit(WhileStatement whileStatement, BlockScope scope)
;
boolean visit(Wildcard wildcard, BlockScope scope)
void endVisit(Wildcard wildcard, BlockScope scope)
boolean visit(Wildcard wildcard, ClassScope scope)
void endVisit(Wildcard wildcard, ClassScope scope)
boolean visit(CombinedBinaryExpression combinedBinaryExpression, BlockScope scope)
void endVisit(CombinedBinaryExpression combinedBinaryExpression, BlockScope scope)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |