org.jmlspecs.jml4.rac
Interface JavaAstVisitor

All Known Subinterfaces:
JmlAstVisitor, RacAstVisitor
All Known Implementing Classes:
AstDirtyBitsRestorer, AstDirtyBitsRetriever, DefaultRacAstVisitor, DesugarSpec, JmlNullifier, ResolutionNullifier

public interface JavaAstVisitor

An AST Visitor interface for visiting every Java-type node.

Author:
Amritam Sarcar

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

visit

boolean visit(AllocationExpression allocationExpression,
              BlockScope scope)
Used to allocate new objects. Examples include:
 new Foo();
 new String[5];
 


endVisit

void endVisit(AllocationExpression allocationExpression,
              BlockScope scope)
See Also:
AllocationExpression

visit

boolean visit(AND_AND_Expression and_and_Expression,
              BlockScope scope)
Expressions separated by the 'AND' operator. Examples include:
 true && false
 a == 2 && m()
 


endVisit

void endVisit(AND_AND_Expression and_and_Expression,
              BlockScope scope)
See Also:
AND_AND_Expression

visit

boolean visit(AnnotationMethodDeclaration annotationTypeDeclaration,
              ClassScope classScope)

endVisit

void endVisit(AnnotationMethodDeclaration annotationTypeDeclaration,
              ClassScope classScope)

visit

boolean visit(Argument argument,
              BlockScope scope)
Examples include:
 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.


endVisit

void endVisit(Argument argument,
              BlockScope scope)
See Also:
Argument

visit

boolean visit(Argument argument,
              ClassScope scope)
See Also:
Argument

endVisit

void endVisit(Argument argument,
              ClassScope scope)
See Also:
Argument

visit

boolean visit(ArrayAllocationExpression arrayAllocationExpression,
              BlockScope scope)
An allocation expression that contains square brackets to create an array. Examples include:
 new int[3][4];
 new int[4][][];
 


endVisit

void endVisit(ArrayAllocationExpression arrayAllocationExpression,
              BlockScope scope)
See Also:
ArrayAllocationExpression

visit

boolean visit(ArrayInitializer arrayInitializer,
              BlockScope scope)
Expression that contains elements with different initial values, at the end of the allocation expression. Examples include: new int [] { 4,7,9 }; int[] n = {1, 2, 3}; In this example, {4,7,9 } and {1,2,3} are array initializers.


endVisit

void endVisit(ArrayInitializer arrayInitializer,
              BlockScope scope)
See Also:
ArrayInitializer

visit

boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
              BlockScope scope)
An array type which has a fully qualified name/type associated with it. Examples include:
 java.lang.String[] x;
 
In this example, java.lang.String[] is an ArrayQualifiedTypeReference


endVisit

void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
              BlockScope scope)
See Also:
ArrayQualifiedTypeReference

visit

boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
              ClassScope scope)
See Also:
ArrayQualifiedTypeReference

endVisit

void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference,
              ClassScope scope)
See Also:
ArrayQualifiedTypeReference

visit

boolean visit(ArrayReference arrayReference,
              BlockScope scope)
Referencing a particular array location. Examples include:
 var[0]
 var[i]
 


endVisit

void endVisit(ArrayReference arrayReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(ArrayTypeReference arrayTypeReference,
              BlockScope scope)
Referencing an array type. Examples include:
 String[]
 int[]
 Object[]
 


endVisit

void endVisit(ArrayTypeReference arrayTypeReference,
              BlockScope scope)
See Also:
ArrayTypeReference

visit

boolean visit(ArrayTypeReference arrayTypeReference,
              ClassScope scope)
See Also:
ArrayTypeReference

endVisit

void endVisit(ArrayTypeReference arrayTypeReference,
              ClassScope scope)
See Also:
ArrayTypeReference

visit

boolean visit(AssertStatement assertStatement,
              BlockScope scope)
Statement that is used to test an assumption is true or false. Examples include:
 assert a == b;
 assert !true;
 


endVisit

void endVisit(AssertStatement assertStatement,
              BlockScope scope)
See Also:
AssertStatement

visit

boolean visit(Assignment assignment,
              BlockScope scope)
Statement that assigns a value to another variable. Examples include:
 a = 2;
 b = new Foo();
 


endVisit

void endVisit(Assignment assignment,
              BlockScope scope)
See Also:
Assignment

visit

boolean visit(BinaryExpression binaryExpression,
              BlockScope scope)
Expressions containing left and right expressions combined by a binary operator. Examples include:
 a + b
 "a" + "b"
 k - 2
 


endVisit

void endVisit(BinaryExpression binaryExpression,
              BlockScope scope)
See Also:
BinaryExpression

visit

boolean visit(Block block,
              BlockScope scope)
Sequence of statements within braces. Examples include:
 { ... }
 


endVisit

void endVisit(Block block,
              BlockScope scope)
See Also:
Block

visit

boolean visit(BreakStatement breakStatement,
              BlockScope scope)
Used to transfer control out of an enclosing statement. Examples include:
 break;
 break la;
 


endVisit

void endVisit(BreakStatement breakStatement,
              BlockScope scope)
See Also:
BreakStatement

visit

boolean visit(CaseStatement caseStatement,
              BlockScope scope)
Examples include:
 case 1: ...
 case 'a': ...
 


endVisit

void endVisit(CaseStatement caseStatement,
              BlockScope scope)
See Also:
CaseStatement

visit

boolean visit(CastExpression castExpression,
              BlockScope scope)
Expression that converts one type to the other type. Examples include:
 (Object) o
 (java.lang.String) s
 
In this example, (Object) and (java.lang.String) are cast expressions.


endVisit

void endVisit(CastExpression castExpression,
              BlockScope scope)
See Also:
CastExpression

visit

boolean visit(CharLiteral charLiteral,
              BlockScope scope)
Is a representation of a fixed value of type char. Examples include:
 'A'
 '\b'
 


endVisit

void endVisit(CharLiteral charLiteral,
              BlockScope scope)
See Also:
CharLiteral

visit

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. Examples include:
 String.class
 


endVisit

void endVisit(ClassLiteralAccess classLiteral,
              BlockScope scope)
See Also:
ClassLiteralAccess

visit

boolean visit(Clinit clinit,
              ClassScope scope)
Class and interface initialization method that are called implicitly by the Java Virtual Machine. Examples include:
 (){
 }
 
The example shown above, is actually a synthetic method, added by the compiler.


endVisit

void endVisit(Clinit clinit,
              ClassScope scope)
See Also:
Clinit

visit

boolean visit(CompilationUnitDeclaration compilationUnitDeclaration,
              CompilationUnitScope scope)

endVisit

void endVisit(CompilationUnitDeclaration compilationUnitDeclaration,
              CompilationUnitScope scope)

visit

boolean visit(CompoundAssignment compoundAssignment,
              BlockScope scope)
Assignment statements which compute and assign at the same time. Examples include:
 a += b;
 z |= x;
 


endVisit

void endVisit(CompoundAssignment compoundAssignment,
              BlockScope scope)
See Also:
CompoundAssignment

visit

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. Examples include:
 s? true: false;
 


endVisit

void endVisit(ConditionalExpression conditionalExpression,
              BlockScope scope)
See Also:
ConditionalExpression

visit

boolean visit(ConstructorDeclaration constructorDeclaration,
              ClassScope scope)
A method declaration which is a constructor. Examples include:
 A(int a) { ... }
 A() { ... }
 


endVisit

void endVisit(ConstructorDeclaration constructorDeclaration,
              ClassScope scope)
See Also:
ConstructorDeclaration

visit

boolean visit(ContinueStatement continueStatement,
              BlockScope scope)
Passes control to the loop-continuation point of an iteration statement. Examples include:
  while(e){ ... 
        if (true) continue;
        ...
  }
  ed: for(;;) {
        if (i==j)
                continue ed;
        else ... 
        }
  
In this example, continue; and continue ed; are Continue statements.


endVisit

void endVisit(ContinueStatement continueStatement,
              BlockScope scope)
See Also:
ContinueStatement

visit

boolean visit(DoStatement doStatement,
              BlockScope scope)
Iterative statement that iterates atleast once. Examples include:
  do {
        ...
  } while ( ... );
  


endVisit

void endVisit(DoStatement doStatement,
              BlockScope scope)
See Also:
DoStatement

visit

boolean visit(DoubleLiteral doubleLiteral,
              BlockScope scope)
Literal signifying a double type. Examples include:
  double d = 1.223;
  double ds = 0.1d;
  


endVisit

void endVisit(DoubleLiteral doubleLiteral,
              BlockScope scope)
See Also:
DoubleLiteral

visit

boolean visit(EmptyStatement emptyStatement,
              BlockScope scope)
Statement that performs no action and obviously has no effect. Examples include:
 ;
 


endVisit

void endVisit(EmptyStatement emptyStatement,
              BlockScope scope)
See Also:
EmptyStatement

visit

boolean visit(EqualExpression equalExpression,
              BlockScope scope)
Expression that checks for equality. Examples include:
 a == b
 a == null
 


endVisit

void endVisit(EqualExpression equalExpression,
              BlockScope scope)
See Also:
EqualExpression

visit

boolean visit(ExplicitConstructorCall explicitConstructor,
              BlockScope scope)
A constructor call that calls a parameterized constructor instead of the default constructor. Examples include:
 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.


endVisit

void endVisit(ExplicitConstructorCall explicitConstructor,
              BlockScope scope)
See Also:
ExplicitConstructorCall

visit

boolean visit(ExtendedStringLiteral extendedStringLiteral,
              BlockScope scope)
Occurs when two or more string literals are concatenated. Examples include:
 "a" + "b"
 "a" + "b" + "C"


endVisit

void endVisit(ExtendedStringLiteral extendedStringLiteral,
              BlockScope scope)
See Also:
ExtendedStringLiteral

visit

boolean visit(FalseLiteral falseLiteral,
              BlockScope scope)
Expression that contains a false literal. Examples include:
 false
 


endVisit

void endVisit(FalseLiteral falseLiteral,
              BlockScope scope)
See Also:
FalseLiteral

visit

boolean visit(FieldDeclaration fieldDeclaration,
              MethodScope scope)
Examples include:
 class A{
 int a;
 Object o = new Object();
 }
 
In this example, int a; is a FieldDeclaration.


endVisit

void endVisit(FieldDeclaration fieldDeclaration,
              MethodScope scope)
See Also:
FieldDeclaration

visit

boolean visit(FieldReference fieldReference,
              BlockScope scope)
Referencing a field of a class. Examples include:
  this.field = ...
  
In this example, this.field is the FieldReference.


endVisit

void endVisit(FieldReference fieldReference,
              BlockScope scope)
See Also:
FieldReference

visit

boolean visit(FieldReference fieldReference,
              ClassScope scope)
See Also:
FieldReference

endVisit

void endVisit(FieldReference fieldReference,
              ClassScope scope)
See Also:
FieldReference

visit

boolean visit(FloatLiteral floatLiteral,
              BlockScope scope)
Literal signifying a float type. Examples include:
 .12
 0.11
 


endVisit

void endVisit(FloatLiteral floatLiteral,
              BlockScope scope)
See Also:
;

visit

boolean visit(ForeachStatement forStatement,
              BlockScope scope)
Enhanced version of the for loop to make iteration over arrays and other collections more convenient. Examples include:
 for (String s: x) {
 ...
 }
 


endVisit

void endVisit(ForeachStatement forStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(ForStatement forStatement,
              BlockScope scope)
Provides a compact-form to iterate over a range of values. Examples include:
 for(int i = 0; i < 10; i++) { ... }
 for(i = 0; ; i++);
 


endVisit

void endVisit(ForStatement forStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(IfStatement ifStatement,
              BlockScope scope)
Control-flow statement that executes a portion of code only if condition is evaluated to true. Examples include:
 if (true) { ... }
 if (expression) { 
        ... 
 } else if (expression) { 
        ... 
 } else { ... }
 


endVisit

void endVisit(IfStatement ifStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(ImportReference importRef,
              CompilationUnitScope scope)
Statement used to reference classes and interfaces declared in other packages. Examples include:
 import packageName.*;
 import packageName.className;
 


endVisit

void endVisit(ImportReference importRef,
              CompilationUnitScope scope)
See Also:
;

visit

boolean visit(Initializer initializer,
              MethodScope scope)
A normal block of code used to initialize fields. Examples include:
 class A{
        int a, b;
        {
        a = 1;
        b = 2;
        }
        ...
 }
 
In this example, { a = 1; b = 2; } is an Initializer.


endVisit

void endVisit(Initializer initializer,
              MethodScope scope)
See Also:
;

visit

boolean visit(InstanceOfExpression instanceOfExpression,
              BlockScope scope)
Expression containing the instanceof operator. Is used to find out whether the class of the object referenced by the run-time value of the expression is compatible with some other reference type.Examples include:
 if ( o instance Object) { ... }
 
In this example, o instanceof Objct is an InstanceOfExpression.


endVisit

void endVisit(InstanceOfExpression instanceOfExpression,
              BlockScope scope)
See Also:
;

visit

boolean visit(IntLiteral intLiteral,
              BlockScope scope)
Literal signifying integer type. Examples include:
 42
 1
 


endVisit

void endVisit(IntLiteral intLiteral,
              BlockScope scope)
See Also:
;

visit

boolean visit(LabeledStatement labeledStatement,
              BlockScope scope)
A statement which has a label followed by statements. Examples include:
 br : switch { ... }
 lbl : int a = 0;
 


endVisit

void endVisit(LabeledStatement labeledStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(LocalDeclaration localDeclaration,
              BlockScope scope)
Declaration within a method body. Examples include:
 int a = 2;
 int d;
 


endVisit

void endVisit(LocalDeclaration localDeclaration,
              BlockScope scope)
See Also:
;

visit

boolean visit(LongLiteral longLiteral,
              BlockScope scope)
Literal that are of long type. Examples include:
 long d = 22232;
 


endVisit

void endVisit(LongLiteral longLiteral,
              BlockScope scope)
See Also:
;

visit

boolean visit(MarkerAnnotation annotation,
              BlockScope scope)

endVisit

void endVisit(MarkerAnnotation annotation,
              BlockScope scope)

visit

boolean visit(MemberValuePair pair,
              BlockScope scope)

endVisit

void endVisit(MemberValuePair pair,
              BlockScope scope)

visit

boolean visit(MessageSend messageSend,
              BlockScope scope)
Calling a method. Examples include:
 m(a, b);
 X.m();
 


endVisit

void endVisit(MessageSend messageSend,
              BlockScope scope)
See Also:
;

visit

boolean visit(MethodDeclaration methodDeclaration,
              ClassScope scope)
Declaration of a method. Examples include:
 private void a(){ ... }
 void b(int d){ ... }
 


endVisit

void endVisit(MethodDeclaration methodDeclaration,
              ClassScope scope)
See Also:
;

visit

boolean visit(StringLiteralConcatenation literal,
              BlockScope scope)

endVisit

void endVisit(StringLiteralConcatenation literal,
              BlockScope scope)

visit

boolean visit(NormalAnnotation annotation,
              BlockScope scope)

endVisit

void endVisit(NormalAnnotation annotation,
              BlockScope scope)

visit

boolean visit(NullLiteral nullLiteral,
              BlockScope scope)
Expression that contains the null keyword. Examples include:
 null
 


endVisit

void endVisit(NullLiteral nullLiteral,
              BlockScope scope)
See Also:
;

visit

boolean visit(OR_OR_Expression or_or_Expression,
              BlockScope scope)
Expressions that contain an 'or' short-circuit operator. Examples include:
 true || false
 a == 2 || m()
 


endVisit

void endVisit(OR_OR_Expression or_or_Expression,
              BlockScope scope)
See Also:
;

visit

boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
              BlockScope scope)
Specifying a particular type (fully qualified name) at compile time to allow a specific, single object. This is used to support generic types. Examples include:
 new java.util.ArrayList();
 
In this example, java.util.ArrayList is a ParameterizedQualifiedTypeReference.


endVisit

void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
              BlockScope scope)
Specifying a particular type at compile time to allow a specific, single object. This is used to support generic types. Examples include:
  new ArrayList();
  
In this example, ArrayList is a ParameterizedSingleTypeReference.


endVisit

void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(PostfixExpression postfixExpression,
              BlockScope scope)
Expressions involving prefix operators. Examples include:
 x++
 x--
 


endVisit

void endVisit(PostfixExpression postfixExpression,
              BlockScope scope)
See Also:
;

visit

boolean visit(PrefixExpression prefixExpression,
              BlockScope scope)
Expressions involving prefix operators. Examples include:
 ++x
 --x
 


endVisit

void endVisit(PrefixExpression prefixExpression,
              BlockScope scope)
See Also:
;

visit

boolean visit(QualifiedAllocationExpression qualifiedAllocationExpression,
              BlockScope scope)
Allocation of an anonymous Type. Examples include:
 new Object() { ... }
 


endVisit

void endVisit(QualifiedAllocationExpression qualifiedAllocationExpression,
              BlockScope scope)
See Also:
;

visit

boolean visit(QualifiedNameReference qualifiedNameReference,
              BlockScope scope)
Referencing a name using full qualified name. Examples include:
 X.a = 1;
 
In this example, X.a is a QualifiedNameReference


endVisit

void endVisit(QualifiedNameReference qualifiedNameReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(QualifiedNameReference qualifiedNameReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(QualifiedNameReference qualifiedNameReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(QualifiedSuperReference qualifiedSuperReference,
              BlockScope scope)
Is used in a subclass to access overridden/inherited methods using fully qualified name. Examples include:
 X.super.m();
 
In this example, X.super.m() is a QualifiedSuperReference.


endVisit

void endVisit(QualifiedSuperReference qualifiedSuperReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(QualifiedSuperReference qualifiedSuperReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(QualifiedSuperReference qualifiedSuperReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(QualifiedThisReference qualifiedThisReference,
              BlockScope scope)
Referencing to the current object using fully qualified name Ñ the object whose method or constructor is being called. Examples include:
 X.this.d = x;
 
In this example, X.this.d is a QualifiedThisReference.


endVisit

void endVisit(QualifiedThisReference qualifiedThisReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(QualifiedThisReference qualifiedThisReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(QualifiedThisReference qualifiedThisReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(QualifiedTypeReference qualifiedTypeReference,
              BlockScope scope)
Referencing a particular type with fully qualified name. Examples include:
 java.lang.String s = ... ;
 Y.Z z = new Y.Z();
 
In this example, java.lang.String and Y.Z is a QualifiedTypeReference.


endVisit

void endVisit(QualifiedTypeReference qualifiedTypeReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(QualifiedTypeReference qualifiedTypeReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(QualifiedTypeReference qualifiedTypeReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(ReturnStatement returnStatement,
              BlockScope scope)
Statement that returns a value from a method. Examples include:
 return ;
 return a;
 return new String("aa");
 
In this example, return, return a, return new String("aa") is a ReturnStatement


endVisit

void endVisit(ReturnStatement returnStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(SingleMemberAnnotation annotation,
              BlockScope scope)

endVisit

void endVisit(SingleMemberAnnotation annotation,
              BlockScope scope)

visit

boolean visit(SingleNameReference singleNameReference,
              BlockScope scope)

endVisit

void endVisit(SingleNameReference singleNameReference,
              BlockScope scope)

visit

boolean visit(SingleNameReference singleNameReference,
              ClassScope scope)

endVisit

void endVisit(SingleNameReference singleNameReference,
              ClassScope scope)

visit

boolean visit(SingleTypeReference singleTypeReference,
              BlockScope scope)
Referencing a type. Examples include:
 interface Y{ ... }
 class X implements Y { ... }
 
In this example, Y in (implements Y) is a SingleTypeReference.


endVisit

void endVisit(SingleTypeReference singleTypeReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(SingleTypeReference singleTypeReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(SingleTypeReference singleTypeReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(StringLiteral stringLiteral,
              BlockScope scope)
Anything enclosed within double-quotes. Examples include:
 "jml4"
 


endVisit

void endVisit(StringLiteral stringLiteral,
              BlockScope scope)
See Also:
;

visit

boolean visit(SuperReference superReference,
              BlockScope scope)
Used in the definitions of instance methods. It is used in a subclass to access overridden/inherited methods. Examples include:
 super.m();
 
In this example, super.m() is a SuperReference.


endVisit

void endVisit(SuperReference superReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(SwitchStatement switchStatement,
              BlockScope scope)
A statement involving switch-case block. Examples include:
  switch (i) {
        case 0: ...
                        break;
        ...
        default: ...
  }
  
In this example, switch(i) { ... } is a Switch Statement


endVisit

void endVisit(SwitchStatement switchStatement,
              BlockScope scope)
See Also:
;

visit

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. Examples include:
 synchronized(t) { ... }
 synchronized(new T()) { ... }
 


endVisit

void endVisit(SynchronizedStatement synchronizedStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(ThisReference thisReference,
              BlockScope scope)
A reference to the current object Ñ the object whose method or constructor is being called. Examples include:
 this.x = x;
 this(0,0);
 
In this example, this.x and this(0,0) is a ThisReference.


endVisit

void endVisit(ThisReference thisReference,
              BlockScope scope)
See Also:
;

visit

boolean visit(ThisReference thisReference,
              ClassScope scope)
See Also:
;

endVisit

void endVisit(ThisReference thisReference,
              ClassScope scope)
See Also:
;

visit

boolean visit(ThrowStatement throwStatement,
              BlockScope scope)
Used to throw an exception. Examples include:
 throw someThrowableObject;
 throw new EmptyStackException();
 


endVisit

void endVisit(ThrowStatement throwStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(TrueLiteral trueLiteral,
              BlockScope scope)
Expression that contains the true keyword. Examples include:
 true
 


endVisit

void endVisit(TrueLiteral trueLiteral,
              BlockScope scope)
See Also:
;

visit

boolean visit(TryStatement tryStatement,
              BlockScope scope)
Statement denoting a try-catch block. Examples include:
 try { ... } catch() { ... }
 try { ... }
 try { ... } finally { ... }
 


endVisit

void endVisit(TryStatement tryStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(TypeDeclaration localTypeDeclaration,
              BlockScope scope)
Declaring an inner type within a method body. Examples include:
 void m() {
        class A { ... }
 }
 
In this example, class A { ... } is a localTypeDeclaration.


endVisit

void endVisit(TypeDeclaration localTypeDeclaration,
              BlockScope scope)
See Also:
;

visit

boolean visit(TypeDeclaration memberTypeDeclaration,
              ClassScope scope)
Declaring an inner type within a class/interface. Examples include:
 class A{
        class B{
        }
 }
 
In this example, class B { } is a memberTypeDeclaration


endVisit

void endVisit(TypeDeclaration memberTypeDeclaration,
              ClassScope scope)
See Also:
;

visit

boolean visit(TypeDeclaration typeDeclaration,
              CompilationUnitScope scope)

endVisit

void endVisit(TypeDeclaration typeDeclaration,
              CompilationUnitScope scope)

visit

boolean visit(TypeParameter typeParameter,
              BlockScope scope)

endVisit

void endVisit(TypeParameter typeParameter,
              BlockScope scope)

visit

boolean visit(TypeParameter typeParameter,
              ClassScope scope)

endVisit

void endVisit(TypeParameter typeParameter,
              ClassScope scope)

visit

boolean visit(UnaryExpression unaryExpression,
              BlockScope scope)
Expressions having unary operators. Examples include:
 ++a
 !a
 ~a 
 z++
 


endVisit

void endVisit(UnaryExpression unaryExpression,
              BlockScope scope)
See Also:
;

visit

boolean visit(WhileStatement whileStatement,
              BlockScope scope)
A loop that is continuously iterated while the a particular condition is true. Examples include:
 while (e);
 while (expression) { ... }
 


endVisit

void endVisit(WhileStatement whileStatement,
              BlockScope scope)
See Also:
;

visit

boolean visit(Wildcard wildcard,
              BlockScope scope)

endVisit

void endVisit(Wildcard wildcard,
              BlockScope scope)

visit

boolean visit(Wildcard wildcard,
              ClassScope scope)

endVisit

void endVisit(Wildcard wildcard,
              ClassScope scope)

visit

boolean visit(CombinedBinaryExpression combinedBinaryExpression,
              BlockScope scope)

endVisit

void endVisit(CombinedBinaryExpression combinedBinaryExpression,
              BlockScope scope)