From 228e99fe5203e92c7297325fec69a82abc1a4bd7 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 25 Mar 2019 23:11:48 +0100 Subject: [fixes #2046] you can now suppress the builder() method, useful if you only want toBuilder(). Also suppresses the warnings about any missing Builder.Default annotations. --- .../after-ecj/BuilderWithNoBuilderMethod.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/transform/resource/after-ecj/BuilderWithNoBuilderMethod.java (limited to 'test/transform/resource/after-ecj') 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); + } +} -- cgit