aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse/EclipseASTAdapter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-06-15 23:30:01 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-06-15 23:30:01 +0200
commitc2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f (patch)
tree9075fc9580765513da5be66b36f6f7e4f8fec51c /src/lombok/eclipse/EclipseASTAdapter.java
parent12ff7ca22385eca5ea213c4b2083d7183e174d92 (diff)
downloadlombok-c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f.tar.gz
lombok-c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f.tar.bz2
lombok-c2fd0a1ef514ec109f7f1b544f46bfb8338b7e8f.zip
Added annotations as definitive children of nodes in our custom AST, and updated the visitor to call a separate visitAnnotationOnX method for annotated stuff. This way, 'handled' can be set per annotation.
Also fixed a bug in AST generation that caused StackOverflowErrors on most source files, and did some cosmetic renaming of parameters.
Diffstat (limited to 'src/lombok/eclipse/EclipseASTAdapter.java')
-rw-r--r--src/lombok/eclipse/EclipseASTAdapter.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lombok/eclipse/EclipseASTAdapter.java b/src/lombok/eclipse/EclipseASTAdapter.java
index 50fded89..d2e0050e 100644
--- a/src/lombok/eclipse/EclipseASTAdapter.java
+++ b/src/lombok/eclipse/EclipseASTAdapter.java
@@ -3,6 +3,7 @@ package lombok.eclipse;
import lombok.eclipse.EclipseAST.Node;
import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
import org.eclipse.jdt.internal.compiler.ast.Initializer;
@@ -14,14 +15,18 @@ public abstract class EclipseASTAdapter implements EclipseASTVisitor {
@Override public void visitCompilationUnit(Node node, CompilationUnitDeclaration unit) {}
@Override public void endVisitCompilationUnit(Node node, CompilationUnitDeclaration unit) {}
@Override public void visitType(Node node, TypeDeclaration type) {}
+ @Override public void visitAnnotationOnType(Node node, TypeDeclaration type, Annotation annotation) {}
@Override public void endVisitType(Node node, TypeDeclaration type) {}
@Override public void visitInitializer(Node node, Initializer initializer) {}
@Override public void endVisitInitializer(Node node, Initializer initializer) {}
@Override public void visitField(Node node, FieldDeclaration field) {}
+ @Override public void visitAnnotationOnField(Node node, FieldDeclaration Field, Annotation annotation) {}
@Override public void endVisitField(Node node, FieldDeclaration field) {}
@Override public void visitMethod(Node node, AbstractMethodDeclaration method) {}
+ @Override public void visitAnnotationOnMethod(Node node, AbstractMethodDeclaration method, Annotation annotation) {}
@Override public void endVisitMethod(Node node, AbstractMethodDeclaration method) {}
@Override public void visitLocal(Node node, LocalDeclaration local) {}
+ @Override public void visitAnnotationOnLocal(Node node, LocalDeclaration local, Annotation annotation) {}
@Override public void endVisitLocal(Node node, LocalDeclaration local) {}
@Override public void visitStatement(Node node, Statement statement) {}
@Override public void endVisitStatement(Node node, Statement statement) {}