Fix for issue #75: If 'setURL' exists, then lombok will no longer make a 'setUrl' field if you have a field named 'url'.

This commit is contained in:
Reinier Zwitserloot committed 2009-12-04 21:16:33 +01:00
1 parent 229cbbb0d9
commit 89d60fcebb
6 files changed
+6 -6

No files matched your search

@@ -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);
@@ -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:
@@ -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:
@@ -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);
}
@@ -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:
@@ -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: