Lombok - v0.10.0

lombok.eclipse
Class EclipseASTAdapter

java.lang.Object
  extended by lombok.eclipse.EclipseASTAdapter
All Implemented Interfaces:
EclipseASTVisitor
Direct Known Subclasses:
HandleVal

public abstract class EclipseASTAdapter
extends Object
implements EclipseASTVisitor

Standard adapter for the EclipseASTVisitor interface. Every method on that interface has been implemented with an empty body. Override whichever methods you need.


Nested Class Summary
 
Nested classes/interfaces inherited from interface lombok.eclipse.EclipseASTVisitor
EclipseASTVisitor.Printer
 
Constructor Summary
EclipseASTAdapter()
           
 
Method Summary
 void endVisitCompilationUnit(EclipseNode top, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
          
 void endVisitField(EclipseNode fieldNode, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)
          
 void endVisitInitializer(EclipseNode initializerNode, org.eclipse.jdt.internal.compiler.ast.Initializer initializer)
          
 void endVisitLocal(EclipseNode localNode, org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)
          
 void endVisitMethod(EclipseNode methodNode, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
          
 void endVisitMethodArgument(EclipseNode argNode, org.eclipse.jdt.internal.compiler.ast.Argument arg, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
          
 void endVisitStatement(EclipseNode statementNode, org.eclipse.jdt.internal.compiler.ast.Statement statement)
          
 void endVisitType(EclipseNode typeNode, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)
          
 void visitAnnotationOnField(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field, EclipseNode annotationNode, org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
          
 void visitAnnotationOnLocal(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local, EclipseNode annotationNode, org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
          
 void visitAnnotationOnMethod(org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method, EclipseNode annotationNode, org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
          
 void visitAnnotationOnMethodArgument(org.eclipse.jdt.internal.compiler.ast.Argument arg, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method, EclipseNode annotationNode, org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
          
 void visitAnnotationOnType(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type, EclipseNode annotationNode, org.eclipse.jdt.internal.compiler.ast.Annotation annotation)
          
 void visitCompilationUnit(EclipseNode top, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
          Called at the very beginning and end.
 void visitField(EclipseNode fieldNode, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)
          Called when visiting a field of a class.
 void visitInitializer(EclipseNode initializerNode, org.eclipse.jdt.internal.compiler.ast.Initializer initializer)
          Called for static and instance initializers.
 void visitLocal(EclipseNode localNode, org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)
          Visits a local declaration - that is, something like 'int x = 10;' on the method level.
 void visitMethod(EclipseNode methodNode, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
          Called for both methods (MethodDeclaration) and constructors (ConstructorDeclaration), but not for Clinit objects, which are a vestigial Eclipse thing that never contain anything.
 void visitMethodArgument(EclipseNode argNode, org.eclipse.jdt.internal.compiler.ast.Argument arg, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
          Visits a method argument
 void visitStatement(EclipseNode statementNode, org.eclipse.jdt.internal.compiler.ast.Statement statement)
          Visits a statement that isn't any of the other visit methods (e.g.
 void visitType(EclipseNode typeNode, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)
          Called when visiting a type (a class, interface, annotation, enum, etcetera).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lombok.eclipse.EclipseASTVisitor
deferUntilPostDiet
 

Constructor Detail

EclipseASTAdapter

public EclipseASTAdapter()
Method Detail

visitCompilationUnit

public void visitCompilationUnit(EclipseNode top,
                                 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
Called at the very beginning and end.

Specified by:
visitCompilationUnit in interface EclipseASTVisitor

endVisitCompilationUnit

public void endVisitCompilationUnit(EclipseNode top,
                                    org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)

Specified by:
endVisitCompilationUnit in interface EclipseASTVisitor

visitType

public void visitType(EclipseNode typeNode,
                      org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)
Called when visiting a type (a class, interface, annotation, enum, etcetera).

Specified by:
visitType in interface EclipseASTVisitor

visitAnnotationOnType

public void visitAnnotationOnType(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type,
                                  EclipseNode annotationNode,
                                  org.eclipse.jdt.internal.compiler.ast.Annotation annotation)

Specified by:
visitAnnotationOnType in interface EclipseASTVisitor

endVisitType

public void endVisitType(EclipseNode typeNode,
                         org.eclipse.jdt.internal.compiler.ast.TypeDeclaration type)

Specified by:
endVisitType in interface EclipseASTVisitor

visitInitializer

public void visitInitializer(EclipseNode initializerNode,
                             org.eclipse.jdt.internal.compiler.ast.Initializer initializer)
Called for static and instance initializers. You can tell the difference via the modifier flag on the ASTNode (8 for static, 0 for not static). The content is in the 'block', not in the 'initialization', which would always be null for an initializer instance.

Specified by:
visitInitializer in interface EclipseASTVisitor

endVisitInitializer

public void endVisitInitializer(EclipseNode initializerNode,
                                org.eclipse.jdt.internal.compiler.ast.Initializer initializer)

Specified by:
endVisitInitializer in interface EclipseASTVisitor

visitField

public void visitField(EclipseNode fieldNode,
                       org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)
Called when visiting a field of a class. Even though in Eclipse initializers (both instance and static) are represented as Initializer objects, which are a subclass of FieldDeclaration, those do NOT result in a call to this method. They result in a call to the visitInitializer method.

Specified by:
visitField in interface EclipseASTVisitor

visitAnnotationOnField

public void visitAnnotationOnField(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field,
                                   EclipseNode annotationNode,
                                   org.eclipse.jdt.internal.compiler.ast.Annotation annotation)

Specified by:
visitAnnotationOnField in interface EclipseASTVisitor

endVisitField

public void endVisitField(EclipseNode fieldNode,
                          org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field)

Specified by:
endVisitField in interface EclipseASTVisitor

visitMethod

public void visitMethod(EclipseNode methodNode,
                        org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
Called for both methods (MethodDeclaration) and constructors (ConstructorDeclaration), but not for Clinit objects, which are a vestigial Eclipse thing that never contain anything. Static initializers show up as 'Initializer', in the visitInitializer method, with modifier bit STATIC set.

Specified by:
visitMethod in interface EclipseASTVisitor

visitAnnotationOnMethod

public void visitAnnotationOnMethod(org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method,
                                    EclipseNode annotationNode,
                                    org.eclipse.jdt.internal.compiler.ast.Annotation annotation)

Specified by:
visitAnnotationOnMethod in interface EclipseASTVisitor

endVisitMethod

public void endVisitMethod(EclipseNode methodNode,
                           org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)

Specified by:
endVisitMethod in interface EclipseASTVisitor

visitMethodArgument

public void visitMethodArgument(EclipseNode argNode,
                                org.eclipse.jdt.internal.compiler.ast.Argument arg,
                                org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)
Visits a method argument

Specified by:
visitMethodArgument in interface EclipseASTVisitor

visitAnnotationOnMethodArgument

public void visitAnnotationOnMethodArgument(org.eclipse.jdt.internal.compiler.ast.Argument arg,
                                            org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method,
                                            EclipseNode annotationNode,
                                            org.eclipse.jdt.internal.compiler.ast.Annotation annotation)

Specified by:
visitAnnotationOnMethodArgument in interface EclipseASTVisitor

endVisitMethodArgument

public void endVisitMethodArgument(EclipseNode argNode,
                                   org.eclipse.jdt.internal.compiler.ast.Argument arg,
                                   org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration method)

Specified by:
endVisitMethodArgument in interface EclipseASTVisitor

visitLocal

public void visitLocal(EclipseNode localNode,
                       org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)
Visits a local declaration - that is, something like 'int x = 10;' on the method level.

Specified by:
visitLocal in interface EclipseASTVisitor

visitAnnotationOnLocal

public void visitAnnotationOnLocal(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local,
                                   EclipseNode annotationNode,
                                   org.eclipse.jdt.internal.compiler.ast.Annotation annotation)

Specified by:
visitAnnotationOnLocal in interface EclipseASTVisitor

endVisitLocal

public void endVisitLocal(EclipseNode localNode,
                          org.eclipse.jdt.internal.compiler.ast.LocalDeclaration local)

Specified by:
endVisitLocal in interface EclipseASTVisitor

visitStatement

public void visitStatement(EclipseNode statementNode,
                           org.eclipse.jdt.internal.compiler.ast.Statement statement)
Visits a statement that isn't any of the other visit methods (e.g. TypeDeclaration).

Specified by:
visitStatement in interface EclipseASTVisitor

endVisitStatement

public void endVisitStatement(EclipseNode statementNode,
                              org.eclipse.jdt.internal.compiler.ast.Statement statement)

Specified by:
endVisitStatement in interface EclipseASTVisitor

Lombok - v0.10.0

Copyright © 2009-2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans, licensed under the MIT licence.