aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleSetter.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-08-06 22:47:59 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-08-06 22:47:59 +0200
commit70317c73841d3e83b4b8008b68bea95753a5275f (patch)
tree1c66ab010930425aa673b3988aa4a5ad3ae1dd13 /src/core/lombok/eclipse/handlers/HandleSetter.java
parentd1b0242dc5e38cddd0e1ecc2a089c13e744d75d4 (diff)
downloadlombok-70317c73841d3e83b4b8008b68bea95753a5275f.tar.gz
lombok-70317c73841d3e83b4b8008b68bea95753a5275f.tar.bz2
lombok-70317c73841d3e83b4b8008b68bea95753a5275f.zip
Added @Value and @FieldDefaults implementations for javac and ecj, the annotations including @NonFinal and @PackagePrivate, and some refactors. No tests yet.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSetter.java')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSetter.java20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java
index 0bce69d6..8037ed23 100644
--- a/src/core/lombok/eclipse/handlers/HandleSetter.java
+++ b/src/core/lombok/eclipse/handlers/HandleSetter.java
@@ -63,13 +63,9 @@ import org.mangosdk.spi.ProviderFor;
public class HandleSetter extends EclipseAnnotationHandler<Setter> {
public boolean generateSetterForType(EclipseNode typeNode, EclipseNode pos, AccessLevel level, boolean checkForTypeLevelSetter) {
if (checkForTypeLevelSetter) {
- if (typeNode != null) for (EclipseNode child : typeNode.down()) {
- if (child.getKind() == Kind.ANNOTATION) {
- if (annotationTypeMatches(Setter.class, child)) {
- //The annotation will make it happen, so we can skip it.
- return true;
- }
- }
+ if (hasAnnotation(Setter.class, typeNode)) {
+ //The annotation will make it happen, so we can skip it.
+ return true;
}
}
@@ -110,13 +106,9 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
* be a warning if its already there. The default access level is used.
*/
public void generateSetterForField(EclipseNode fieldNode, ASTNode pos, AccessLevel level) {
- for (EclipseNode child : fieldNode.down()) {
- if (child.getKind() == Kind.ANNOTATION) {
- if (annotationTypeMatches(Setter.class, child)) {
- //The annotation will make it happen, so we can skip it.
- return;
- }
- }
+ if (hasAnnotation(Setter.class, fieldNode)) {
+ //The annotation will make it happen, so we can skip it.
+ return;
}
createSetterForField(level, fieldNode, fieldNode, pos, false);