From 6d425594176e8493ecec4d5e958a2dcbd611eeb1 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 24 Jun 2009 01:23:10 +0200 Subject: Work on HandleData, as well as generalizing features in the the PKG class and updating HandleGetter/Setter to call into it. --- src/lombok/javac/handlers/HandleGetter.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/lombok/javac/handlers/HandleGetter.java') diff --git a/src/lombok/javac/handlers/HandleGetter.java b/src/lombok/javac/handlers/HandleGetter.java index 3405810b..f66247ff 100644 --- a/src/lombok/javac/handlers/HandleGetter.java +++ b/src/lombok/javac/handlers/HandleGetter.java @@ -1,7 +1,6 @@ package lombok.javac.handlers; import static lombok.javac.handlers.PKG.*; - import lombok.AccessLevel; import lombok.Getter; import lombok.core.AnnotationValues; @@ -16,7 +15,6 @@ import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.JCTree.JCAnnotation; import com.sun.tools.javac.tree.JCTree.JCBlock; -import com.sun.tools.javac.tree.JCTree.JCClassDecl; import com.sun.tools.javac.tree.JCTree.JCExpression; import com.sun.tools.javac.tree.JCTree.JCMethodDecl; import com.sun.tools.javac.tree.JCTree.JCStatement; @@ -75,14 +73,9 @@ public class HandleGetter implements JavacAnnotationHandler { //continue with creating the getter } - JCClassDecl javacClassTree = (JCClassDecl) fieldNode.up().get(); - long access = toJavacModifier(level) | (fieldDecl.mods.flags & Flags.STATIC); - JCMethodDecl getterMethod = createGetter(access, fieldNode, fieldNode.getTreeMaker()); - javacClassTree.defs = javacClassTree.defs.append(getterMethod); - - fieldNode.up().add(getterMethod, Kind.METHOD).recursiveSetHandled(); + injectMethod(fieldNode.up(), createGetter(access, fieldNode, fieldNode.getTreeMaker())); return true; } -- cgit