diff options
Diffstat (limited to 'test/transform')
4 files changed, 66 insertions, 1 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java b/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java new file mode 100644 index 00000000..35e2c79e --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderWithNoBuilderMethod.java @@ -0,0 +1,33 @@ +class BuilderWithNoBuilderMethod { + private String a = ""; + @java.lang.SuppressWarnings("all") + BuilderWithNoBuilderMethod(final String a) { + this.a = a; + } + @java.lang.SuppressWarnings("all") + public static class BuilderWithNoBuilderMethodBuilder { + @java.lang.SuppressWarnings("all") + private String a; + @java.lang.SuppressWarnings("all") + BuilderWithNoBuilderMethodBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderWithNoBuilderMethodBuilder a(final String a) { + this.a = a; + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderWithNoBuilderMethod build() { + return new BuilderWithNoBuilderMethod(a); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder(a=" + this.a + ")"; + } + } + @java.lang.SuppressWarnings("all") + public BuilderWithNoBuilderMethodBuilder toBuilder() { + return new BuilderWithNoBuilderMethodBuilder().a(this.a); + } +} diff --git a/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java new file mode 100644 index 00000000..624b14b9 --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java @@ -0,0 +1,27 @@ +import lombok.Builder; +@Builder(toBuilder = true,builderMethodName = "") class BuilderWithNoBuilderMethod { + public static @java.lang.SuppressWarnings("all") class BuilderWithNoBuilderMethodBuilder { + private @java.lang.SuppressWarnings("all") String a; + @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder a(final String a) { + this.a = a; + return this; + } + public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod build() { + return new BuilderWithNoBuilderMethod(a); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder(a=" + this.a) + ")"); + } + } + private String a = ""; + @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod(final String a) { + super(); + this.a = a; + } + public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder toBuilder() { + return new BuilderWithNoBuilderMethodBuilder().a(this.a); + } +} diff --git a/test/transform/resource/before/BuilderWithNoBuilderMethod.java b/test/transform/resource/before/BuilderWithNoBuilderMethod.java new file mode 100644 index 00000000..3f2b21ac --- /dev/null +++ b/test/transform/resource/before/BuilderWithNoBuilderMethod.java @@ -0,0 +1,5 @@ +import lombok.Builder; +@Builder(toBuilder = true, builderMethodName = "") +class BuilderWithNoBuilderMethod { + private String a = ""; +} diff --git a/test/transform/resource/messages-delombok/BuilderDefaultsWarnings.java.messages b/test/transform/resource/messages-delombok/BuilderDefaultsWarnings.java.messages index 694511f8..c6590132 100644 --- a/test/transform/resource/messages-delombok/BuilderDefaultsWarnings.java.messages +++ b/test/transform/resource/messages-delombok/BuilderDefaultsWarnings.java.messages @@ -1,4 +1,4 @@ 13 @Builder.Default requires @Builder on the class for it to mean anything. -6 @Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final. 8 @Builder.Default requires an initializing expression (' = something;'). 9 @Builder.Default and @Singular cannot be mixed. +6 @Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final. |