aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-02-08 22:53:19 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-02-08 22:53:19 +0100
commit2aff2159fcaf35c2cda4f837c5ceb65318b81db9 (patch)
treeca065af7e33a2b2220540de7dc0a01f02e9207eb /src/core/lombok/eclipse/handlers
parent855f9314d621327de3321e2e5bf230e33fb7b1dc (diff)
downloadlombok-2aff2159fcaf35c2cda4f837c5ceb65318b81db9.tar.gz
lombok-2aff2159fcaf35c2cda4f837c5ceb65318b81db9.tar.bz2
lombok-2aff2159fcaf35c2cda4f837c5ceb65318b81db9.zip
marking generated fields in builders as generated. This seems superfluous as the entire builder class is marked as such, but it won’t be if that part is manually written but builder is supposed to fill in a few blanks.
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleBuilder.java4
-rw-r--r--src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java2
-rw-r--r--src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSetSingularizer.java2
-rw-r--r--src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilMapSingularizer.java4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java
index 45f4342e..c1b0d8a3 100644
--- a/src/core/lombok/eclipse/handlers/HandleBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java
@@ -273,7 +273,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
cleanDecl.modifiers = ClassFileConstants.AccPrivate;
cleanDecl.type = TypeReference.baseTypeReference(TypeIds.T_boolean, 0);
System.out.println("INJECTING: cleaning");
- injectField(builderType, cleanDecl);
+ injectFieldAndMarkGenerated(builderType, cleanDecl);
}
if (constructorExists(builderType) == MemberExistsResult.NOT_EXISTS) {
@@ -444,7 +444,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
fd.modifiers = ClassFileConstants.AccPrivate;
fd.type = copyType(bfd.type);
fd.traverse(new SetGeneratedByVisitor(source), (MethodScope) null);
- bfd.createdFields.add(injectField(builderType, fd));
+ bfd.createdFields.add(injectFieldAndMarkGenerated(builderType, fd));
}
}
}
diff --git a/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java b/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java
index 3b2ca875..fa121328 100644
--- a/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java
+++ b/src/core/lombok/eclipse/handlers/singulars/EclipseGuavaSingularizer.java
@@ -98,7 +98,7 @@ abstract class EclipseGuavaSingularizer extends EclipseSingularizer {
buildField.declarationSourceEnd = -1;
buildField.type = type;
data.setGeneratedByRecursive(buildField);
- return Collections.singletonList(injectField(builderType, buildField));
+ return Collections.singletonList(injectFieldAndMarkGenerated(builderType, buildField));
}
@Override public void generateMethods(SingularData data, EclipseNode builderType, boolean fluent, boolean chain) {
diff --git a/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSetSingularizer.java b/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSetSingularizer.java
index 1d1c4dbd..4b59f7a8 100644
--- a/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSetSingularizer.java
+++ b/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSetSingularizer.java
@@ -80,7 +80,7 @@ abstract class EclipseJavaUtilListSetSingularizer extends EclipseJavaUtilSingula
buildField.declarationSourceEnd = -1;
buildField.type = type;
data.setGeneratedByRecursive(buildField);
- return Collections.singletonList(injectField(builderType, buildField));
+ return Collections.singletonList(injectFieldAndMarkGenerated(builderType, buildField));
}
@Override public void generateMethods(SingularData data, EclipseNode builderType, boolean fluent, boolean chain) {
diff --git a/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilMapSingularizer.java b/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilMapSingularizer.java
index 640bd396..1c6b1ff3 100644
--- a/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilMapSingularizer.java
+++ b/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilMapSingularizer.java
@@ -123,8 +123,8 @@ public class EclipseJavaUtilMapSingularizer extends EclipseJavaUtilSingularizer
}
data.setGeneratedByRecursive(buildKeyField);
data.setGeneratedByRecursive(buildValueField);
- EclipseNode keyFieldNode = injectField(builderType, buildKeyField);
- EclipseNode valueFieldNode = injectField(builderType, buildValueField);
+ EclipseNode keyFieldNode = injectFieldAndMarkGenerated(builderType, buildKeyField);
+ EclipseNode valueFieldNode = injectFieldAndMarkGenerated(builderType, buildValueField);
return Arrays.asList(keyFieldNode, valueFieldNode);
}