diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-12-04 21:16:33 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-12-04 21:16:33 +0100 |
commit | 89d60fcebbd86c971b9b564c7bd68903978c0649 (patch) | |
tree | cea81f9b1097513b79b37aaff27071a286357a02 | |
parent | 229cbbb0d9e7b18b4a4b214f8d5198c527a4f714 (diff) | |
download | lombok-89d60fcebbd86c971b9b564c7bd68903978c0649.tar.gz lombok-89d60fcebbd86c971b9b564c7bd68903978c0649.tar.bz2 lombok-89d60fcebbd86c971b9b564c7bd68903978c0649.zip |
Fix for issue #75: If 'setURL' exists, then lombok will no longer make a 'setUrl' field if you have a field named 'url'.
6 files changed, 6 insertions, 6 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleData.java b/src/core/lombok/eclipse/handlers/HandleData.java index 4e23bbf4..bbf1822e 100644 --- a/src/core/lombok/eclipse/handlers/HandleData.java +++ b/src/core/lombok/eclipse/handlers/HandleData.java @@ -119,7 +119,7 @@ public class HandleData implements EclipseAnnotationHandler<Data> { } if (ann.staticConstructor().length() > 0) { - if (methodExists("of", typeNode) == MemberExistsResult.NOT_EXISTS) { + if (methodExists("of", typeNode, false) == MemberExistsResult.NOT_EXISTS) { MethodDeclaration staticConstructor = createStaticConstructor( ann.staticConstructor(), typeNode, nodesForConstructor, ast); injectMethod(typeNode, staticConstructor); diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java index a020aeed..d786f20f 100644 --- a/src/core/lombok/eclipse/handlers/HandleGetter.java +++ b/src/core/lombok/eclipse/handlers/HandleGetter.java @@ -99,7 +99,7 @@ public class HandleGetter implements EclipseAnnotationHandler<Getter> { int modifier = toEclipseModifier(level) | (field.modifiers & ClassFileConstants.AccStatic); for (String altName : TransformationsUtil.toAllGetterNames(fieldName, isBoolean)) { - switch (methodExists(altName, fieldNode)) { + switch (methodExists(altName, fieldNode, false)) { case EXISTS_BY_LOMBOK: return true; case EXISTS_BY_USER: diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java index d1f47513..7760acd9 100644 --- a/src/core/lombok/eclipse/handlers/HandleSetter.java +++ b/src/core/lombok/eclipse/handlers/HandleSetter.java @@ -103,7 +103,7 @@ public class HandleSetter implements EclipseAnnotationHandler<Setter> { int modifier = toEclipseModifier(level) | (field.modifiers & ClassFileConstants.AccStatic); - switch (methodExists(setterName, fieldNode)) { + switch (methodExists(setterName, fieldNode, false)) { case EXISTS_BY_LOMBOK: return true; case EXISTS_BY_USER: diff --git a/src/core/lombok/javac/handlers/HandleData.java b/src/core/lombok/javac/handlers/HandleData.java index 128db8b0..88c0553c 100644 --- a/src/core/lombok/javac/handlers/HandleData.java +++ b/src/core/lombok/javac/handlers/HandleData.java @@ -101,7 +101,7 @@ public class HandleData implements JavacAnnotationHandler<Data> { injectMethod(typeNode, constructor); } - if (!staticConstructorName.isEmpty() && methodExists("of", typeNode) == MemberExistsResult.NOT_EXISTS) { + if (!staticConstructorName.isEmpty() && methodExists("of", typeNode, false) == MemberExistsResult.NOT_EXISTS) { JCMethodDecl staticConstructor = createStaticConstructor(staticConstructorName, typeNode, nodesForConstructor); injectMethod(typeNode, staticConstructor); } diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java index 46d245b6..14570187 100644 --- a/src/core/lombok/javac/handlers/HandleGetter.java +++ b/src/core/lombok/javac/handlers/HandleGetter.java @@ -100,7 +100,7 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> { String methodName = toGetterName(fieldDecl); for (String altName : toAllGetterNames(fieldDecl)) { - switch (methodExists(altName, fieldNode)) { + switch (methodExists(altName, fieldNode, false)) { case EXISTS_BY_LOMBOK: return true; case EXISTS_BY_USER: diff --git a/src/core/lombok/javac/handlers/HandleSetter.java b/src/core/lombok/javac/handlers/HandleSetter.java index 4726f771..1d1421b9 100644 --- a/src/core/lombok/javac/handlers/HandleSetter.java +++ b/src/core/lombok/javac/handlers/HandleSetter.java @@ -101,7 +101,7 @@ public class HandleSetter implements JavacAnnotationHandler<Setter> { JCVariableDecl fieldDecl = (JCVariableDecl)fieldNode.get(); String methodName = toSetterName(fieldDecl); - switch (methodExists(methodName, fieldNode)) { + switch (methodExists(methodName, fieldNode, false)) { case EXISTS_BY_LOMBOK: return true; case EXISTS_BY_USER: |