Lombok - v0.10.8

lombok.javac
Class JavacASTAdapter

java.lang.Object
  extended by lombok.javac.JavacASTAdapter
All Implemented Interfaces:
JavacASTVisitor
Direct Known Subclasses:
HandleVal

public class JavacASTAdapter
extends Object
implements JavacASTVisitor

Standard adapter for the JavacASTVisitor 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.javac.JavacASTVisitor
JavacASTVisitor.Printer
 
Constructor Summary
JavacASTAdapter()
           
 
Method Summary
 void endVisitCompilationUnit(JavacNode top, com.sun.tools.javac.tree.JCTree.JCCompilationUnit unit)
          
 void endVisitField(JavacNode fieldNode, com.sun.tools.javac.tree.JCTree.JCVariableDecl field)
          
 void endVisitInitializer(JavacNode initializerNode, com.sun.tools.javac.tree.JCTree.JCBlock initializer)
          
 void endVisitLocal(JavacNode localNode, com.sun.tools.javac.tree.JCTree.JCVariableDecl local)
          
 void endVisitMethod(JavacNode methodNode, com.sun.tools.javac.tree.JCTree.JCMethodDecl method)
          
 void endVisitMethodArgument(JavacNode argumentNode, com.sun.tools.javac.tree.JCTree.JCVariableDecl argument, com.sun.tools.javac.tree.JCTree.JCMethodDecl method)
          
 void endVisitStatement(JavacNode statementNode, com.sun.tools.javac.tree.JCTree statement)
          
 void endVisitType(JavacNode typeNode, com.sun.tools.javac.tree.JCTree.JCClassDecl type)
          
 boolean isResolutionBased()
          If true, you'll be called after all the non-resolution based visitors.
 void visitAnnotationOnField(com.sun.tools.javac.tree.JCTree.JCVariableDecl field, JavacNode annotationNode, com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)
          
 void visitAnnotationOnLocal(com.sun.tools.javac.tree.JCTree.JCVariableDecl local, JavacNode annotationNode, com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)
          
 void visitAnnotationOnMethod(com.sun.tools.javac.tree.JCTree.JCMethodDecl method, JavacNode annotationNode, com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)
          
 void visitAnnotationOnMethodArgument(com.sun.tools.javac.tree.JCTree.JCVariableDecl argument, com.sun.tools.javac.tree.JCTree.JCMethodDecl method, JavacNode annotationNode, com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)
          
 void visitAnnotationOnType(com.sun.tools.javac.tree.JCTree.JCClassDecl type, JavacNode annotationNode, com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)
          
 void visitCompilationUnit(JavacNode top, com.sun.tools.javac.tree.JCTree.JCCompilationUnit unit)
          Called at the very beginning and end.
 void visitField(JavacNode fieldNode, com.sun.tools.javac.tree.JCTree.JCVariableDecl field)
          Called when visiting a field of a class.
 void visitInitializer(JavacNode initializerNode, com.sun.tools.javac.tree.JCTree.JCBlock initializer)
          Called for static and instance initializers.
 void visitLocal(JavacNode localNode, com.sun.tools.javac.tree.JCTree.JCVariableDecl local)
          Visits a local declaration - that is, something like 'int x = 10;' on the method level.
 void visitMethod(JavacNode methodNode, com.sun.tools.javac.tree.JCTree.JCMethodDecl method)
          Called for both methods and constructors.
 void visitMethodArgument(JavacNode argumentNode, com.sun.tools.javac.tree.JCTree.JCVariableDecl argument, com.sun.tools.javac.tree.JCTree.JCMethodDecl method)
          Visits a method argument.
 void visitStatement(JavacNode statementNode, com.sun.tools.javac.tree.JCTree statement)
          Visits a statement that isn't any of the other visit methods (e.g.
 void visitType(JavacNode typeNode, com.sun.tools.javac.tree.JCTree.JCClassDecl 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
 

Constructor Detail

JavacASTAdapter

public JavacASTAdapter()
Method Detail

isResolutionBased

public boolean isResolutionBased()
If true, you'll be called after all the non-resolution based visitors. NB: Temporary solution - will be rewritten to a different style altogether in a future release.

Specified by:
isResolutionBased in interface JavacASTVisitor

visitCompilationUnit

public void visitCompilationUnit(JavacNode top,
                                 com.sun.tools.javac.tree.JCTree.JCCompilationUnit unit)
Called at the very beginning and end.

Specified by:
visitCompilationUnit in interface JavacASTVisitor

endVisitCompilationUnit

public void endVisitCompilationUnit(JavacNode top,
                                    com.sun.tools.javac.tree.JCTree.JCCompilationUnit unit)

Specified by:
endVisitCompilationUnit in interface JavacASTVisitor

visitType

public void visitType(JavacNode typeNode,
                      com.sun.tools.javac.tree.JCTree.JCClassDecl type)
Called when visiting a type (a class, interface, annotation, enum, etcetera).

Specified by:
visitType in interface JavacASTVisitor

visitAnnotationOnType

public void visitAnnotationOnType(com.sun.tools.javac.tree.JCTree.JCClassDecl type,
                                  JavacNode annotationNode,
                                  com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)

Specified by:
visitAnnotationOnType in interface JavacASTVisitor

endVisitType

public void endVisitType(JavacNode typeNode,
                         com.sun.tools.javac.tree.JCTree.JCClassDecl type)

Specified by:
endVisitType in interface JavacASTVisitor

visitField

public void visitField(JavacNode fieldNode,
                       com.sun.tools.javac.tree.JCTree.JCVariableDecl field)
Called when visiting a field of a class.

Specified by:
visitField in interface JavacASTVisitor

visitAnnotationOnField

public void visitAnnotationOnField(com.sun.tools.javac.tree.JCTree.JCVariableDecl field,
                                   JavacNode annotationNode,
                                   com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)

Specified by:
visitAnnotationOnField in interface JavacASTVisitor

endVisitField

public void endVisitField(JavacNode fieldNode,
                          com.sun.tools.javac.tree.JCTree.JCVariableDecl field)

Specified by:
endVisitField in interface JavacASTVisitor

visitInitializer

public void visitInitializer(JavacNode initializerNode,
                             com.sun.tools.javac.tree.JCTree.JCBlock initializer)
Called for static and instance initializers. You can tell the difference via the isStatic() method.

Specified by:
visitInitializer in interface JavacASTVisitor

endVisitInitializer

public void endVisitInitializer(JavacNode initializerNode,
                                com.sun.tools.javac.tree.JCTree.JCBlock initializer)

Specified by:
endVisitInitializer in interface JavacASTVisitor

visitMethod

public void visitMethod(JavacNode methodNode,
                        com.sun.tools.javac.tree.JCTree.JCMethodDecl method)
Called for both methods and constructors.

Specified by:
visitMethod in interface JavacASTVisitor

visitAnnotationOnMethod

public void visitAnnotationOnMethod(com.sun.tools.javac.tree.JCTree.JCMethodDecl method,
                                    JavacNode annotationNode,
                                    com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)

Specified by:
visitAnnotationOnMethod in interface JavacASTVisitor

endVisitMethod

public void endVisitMethod(JavacNode methodNode,
                           com.sun.tools.javac.tree.JCTree.JCMethodDecl method)

Specified by:
endVisitMethod in interface JavacASTVisitor

visitMethodArgument

public void visitMethodArgument(JavacNode argumentNode,
                                com.sun.tools.javac.tree.JCTree.JCVariableDecl argument,
                                com.sun.tools.javac.tree.JCTree.JCMethodDecl method)
Visits a method argument.

Specified by:
visitMethodArgument in interface JavacASTVisitor

visitAnnotationOnMethodArgument

public void visitAnnotationOnMethodArgument(com.sun.tools.javac.tree.JCTree.JCVariableDecl argument,
                                            com.sun.tools.javac.tree.JCTree.JCMethodDecl method,
                                            JavacNode annotationNode,
                                            com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)

Specified by:
visitAnnotationOnMethodArgument in interface JavacASTVisitor

endVisitMethodArgument

public void endVisitMethodArgument(JavacNode argumentNode,
                                   com.sun.tools.javac.tree.JCTree.JCVariableDecl argument,
                                   com.sun.tools.javac.tree.JCTree.JCMethodDecl method)

Specified by:
endVisitMethodArgument in interface JavacASTVisitor

visitLocal

public void visitLocal(JavacNode localNode,
                       com.sun.tools.javac.tree.JCTree.JCVariableDecl local)
Visits a local declaration - that is, something like 'int x = 10;' on the method level. Also called for method parameters.

Specified by:
visitLocal in interface JavacASTVisitor

visitAnnotationOnLocal

public void visitAnnotationOnLocal(com.sun.tools.javac.tree.JCTree.JCVariableDecl local,
                                   JavacNode annotationNode,
                                   com.sun.tools.javac.tree.JCTree.JCAnnotation annotation)

Specified by:
visitAnnotationOnLocal in interface JavacASTVisitor

endVisitLocal

public void endVisitLocal(JavacNode localNode,
                          com.sun.tools.javac.tree.JCTree.JCVariableDecl local)

Specified by:
endVisitLocal in interface JavacASTVisitor

visitStatement

public void visitStatement(JavacNode statementNode,
                           com.sun.tools.javac.tree.JCTree statement)
Visits a statement that isn't any of the other visit methods (e.g. JCClassDecl). The statement object is guaranteed to be either a JCStatement or a JCExpression.

Specified by:
visitStatement in interface JavacASTVisitor

endVisitStatement

public void endVisitStatement(JavacNode statementNode,
                              com.sun.tools.javac.tree.JCTree statement)

Specified by:
endVisitStatement in interface JavacASTVisitor

Lombok - v0.10.8

Copyright © 2009-2011 The Project Lombok Authors, licensed under the MIT licence.