aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/javac/handlers/HandleGetter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-06-24 01:23:10 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-06-24 01:23:10 +0200
commit6d425594176e8493ecec4d5e958a2dcbd611eeb1 (patch)
tree08c86f7b155949b1f7ab9fc59b0a8fa288868f55 /src/lombok/javac/handlers/HandleGetter.java
parentc346b5c0546364e1721d0eda37ea5b465a20de0d (diff)
downloadlombok-6d425594176e8493ecec4d5e958a2dcbd611eeb1.tar.gz
lombok-6d425594176e8493ecec4d5e958a2dcbd611eeb1.tar.bz2
lombok-6d425594176e8493ecec4d5e958a2dcbd611eeb1.zip
Work on HandleData, as well as generalizing features in the the PKG class and updating HandleGetter/Setter to call into it.
Diffstat (limited to 'src/lombok/javac/handlers/HandleGetter.java')
-rw-r--r--src/lombok/javac/handlers/HandleGetter.java9
1 files changed, 1 insertions, 8 deletions
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<Getter> {
//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;
}