From 70317c73841d3e83b4b8008b68bea95753a5275f Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 6 Aug 2012 22:47:59 +0200 Subject: Added @Value and @FieldDefaults implementations for javac and ecj, the annotations including @NonFinal and @PackagePrivate, and some refactors. No tests yet. --- src/core/lombok/eclipse/handlers/HandleGetter.java | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/core/lombok/eclipse/handlers/HandleGetter.java') diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java index 31376749..df05fc7e 100644 --- a/src/core/lombok/eclipse/handlers/HandleGetter.java +++ b/src/core/lombok/eclipse/handlers/HandleGetter.java @@ -78,13 +78,9 @@ public class HandleGetter extends EclipseAnnotationHandler { public boolean generateGetterForType(EclipseNode typeNode, EclipseNode pos, AccessLevel level, boolean checkForTypeLevelGetter) { if (checkForTypeLevelGetter) { - if (typeNode != null) for (EclipseNode child : typeNode.down()) { - if (child.getKind() == Kind.ANNOTATION) { - if (annotationTypeMatches(Getter.class, child)) { - //The annotation will make it happen, so we can skip it. - return true; - } - } + if (hasAnnotation(Getter.class, typeNode)) { + //The annotation will make it happen, so we can skip it. + return true; } } @@ -124,13 +120,9 @@ public class HandleGetter extends EclipseAnnotationHandler { * be a warning if its already there. The default access level is used. */ public void generateGetterForField(EclipseNode fieldNode, ASTNode pos, AccessLevel level, boolean lazy) { - for (EclipseNode child : fieldNode.down()) { - if (child.getKind() == Kind.ANNOTATION) { - if (annotationTypeMatches(Getter.class, child)) { - //The annotation will make it happen, so we can skip it. - return; - } - } + if (hasAnnotation(Getter.class, fieldNode)) { + //The annotation will make it happen, so we can skip it. + return; } createGetterForField(level, fieldNode, fieldNode, pos, false, lazy); -- cgit