diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
29 files changed, 212 insertions, 94 deletions
diff --git a/test/transform/resource/after-ecj/BuilderCustomName.java b/test/transform/resource/after-ecj/BuilderCustomName.java index 652bdf16..cb578ccd 100644 --- a/test/transform/resource/after-ecj/BuilderCustomName.java +++ b/test/transform/resource/after-ecj/BuilderCustomName.java @@ -5,8 +5,6 @@ import java.util.List; public SimpleTestBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -14,6 +12,8 @@ import java.util.List; this.field = field; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("BuilderCustomName.SimpleTestBuilder(field=" + this.field) + ")"); } diff --git a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java index 74a1c80f..228993e0 100644 --- a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java +++ b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java @@ -11,8 +11,6 @@ class CheckerFrameworkSuperBuilder { public ParentBuilder() { super(); } - protected abstract @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") @org.checkerframework.common.returnsreceiver.qual.This B self(); - public abstract @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(CheckerFrameworkSuperBuilder.Parent. @org.checkerframework.checker.calledmethods.qual.CalledMethods({"y", "z"}) ParentBuilder<C, B> this); /** * @return {@code this}. */ @@ -56,6 +54,8 @@ class CheckerFrameworkSuperBuilder { this.names.clear(); return self(); } + protected abstract @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") @org.checkerframework.common.returnsreceiver.qual.This B self(); + public abstract @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(CheckerFrameworkSuperBuilder.Parent. @org.checkerframework.checker.calledmethods.qual.CalledMethods({"y", "z"}) ParentBuilder<C, B> this); public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((((("CheckerFrameworkSuperBuilder.Parent.ParentBuilder(x$value=" + this.x$value) + ", y=") + this.y) + ", z=") + this.z) + ", names=") + this.names) + ")"); } @@ -111,8 +111,6 @@ class CheckerFrameworkSuperBuilder { public ZChildBuilder() { super(); } - protected abstract @java.lang.Override @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") @org.checkerframework.common.returnsreceiver.qual.This B self(); - public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(CheckerFrameworkSuperBuilder.ZChild. @org.checkerframework.checker.calledmethods.qual.CalledMethods("b") ZChildBuilder<C, B> this); /** * @return {@code this}. */ @@ -128,6 +126,8 @@ class CheckerFrameworkSuperBuilder { this.b = b; return self(); } + protected abstract @java.lang.Override @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") @org.checkerframework.common.returnsreceiver.qual.This B self(); + public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(CheckerFrameworkSuperBuilder.ZChild. @org.checkerframework.checker.calledmethods.qual.CalledMethods("b") ZChildBuilder<C, B> this); public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder(super=" + super.toString()) + ", a$value=") + this.a$value) + ", b=") + this.b) + ")"); } diff --git a/test/transform/resource/after-ecj/ConstructorsWithSuperBuilderDefaults.java b/test/transform/resource/after-ecj/ConstructorsWithSuperBuilderDefaults.java index a6c97d3b..16a4ee92 100644 --- a/test/transform/resource/after-ecj/ConstructorsWithSuperBuilderDefaults.java +++ b/test/transform/resource/after-ecj/ConstructorsWithSuperBuilderDefaults.java @@ -10,8 +10,6 @@ import lombok.Builder; public ConstructorsWithSuperBuilderDefaultsBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -27,6 +25,8 @@ import lombok.Builder; this.y = y; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("ConstructorsWithSuperBuilderDefaults.ConstructorsWithSuperBuilderDefaultsBuilder(x$value=" + this.x$value) + ", y=") + this.y) + ")"); } diff --git a/test/transform/resource/after-ecj/JacksonizedSuperBuilderSimple.java b/test/transform/resource/after-ecj/JacksonizedSuperBuilderSimple.java index 46709a66..348d91a2 100644 --- a/test/transform/resource/after-ecj/JacksonizedSuperBuilderSimple.java +++ b/test/transform/resource/after-ecj/JacksonizedSuperBuilderSimple.java @@ -5,8 +5,6 @@ public class JacksonizedSuperBuilderSimple { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -14,6 +12,8 @@ public class JacksonizedSuperBuilderSimple { this.field1 = field1; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("JacksonizedSuperBuilderSimple.Parent.ParentBuilder(field1=" + this.field1) + ")"); } diff --git a/test/transform/resource/after-ecj/JacksonizedSuperBuilderWithJsonDeserialize.java b/test/transform/resource/after-ecj/JacksonizedSuperBuilderWithJsonDeserialize.java index 62938eea..a72da70b 100644 --- a/test/transform/resource/after-ecj/JacksonizedSuperBuilderWithJsonDeserialize.java +++ b/test/transform/resource/after-ecj/JacksonizedSuperBuilderWithJsonDeserialize.java @@ -4,8 +4,6 @@ public @lombok.extern.jackson.Jacksonized @lombok.experimental.SuperBuilder @com public JacksonizedSuperBuilderWithJsonDeserializeBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -13,6 +11,8 @@ public @lombok.extern.jackson.Jacksonized @lombok.experimental.SuperBuilder @com this.field1 = field1; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("JacksonizedSuperBuilderWithJsonDeserialize.JacksonizedSuperBuilderWithJsonDeserializeBuilder(field1=" + this.field1) + ")"); } diff --git a/test/transform/resource/after-ecj/LoggerFloggerRecord.java b/test/transform/resource/after-ecj/LoggerFloggerRecord.java index 86004b67..fde69e74 100644 --- a/test/transform/resource/after-ecj/LoggerFloggerRecord.java +++ b/test/transform/resource/after-ecj/LoggerFloggerRecord.java @@ -1,6 +1,7 @@ +// version 19: import lombok.extern.flogger.Flogger; class LoggerFloggerRecord { - static @Flogger record Inner(String x) { + public @Flogger record Inner(com log) { private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); /* Implicit */ private final String x; <clinit>() { diff --git a/test/transform/resource/after-ecj/NonNullOnRecord3.java b/test/transform/resource/after-ecj/NonNullOnRecord3.java index 44c00098..37f0afcf 100644 --- a/test/transform/resource/after-ecj/NonNullOnRecord3.java +++ b/test/transform/resource/after-ecj/NonNullOnRecord3.java @@ -1,13 +1,9 @@ -// version 14: +// version 19: import lombok.NonNull; public record NonNullOnRecord3(String a) { /* Implicit */ private final String a; public NonNullOnRecord3(String a) { super(); - .a = a; - } - public NonNullOnRecord3(String a) { - super(); this.a = a; } public void method(@NonNull String param) { diff --git a/test/transform/resource/after-ecj/NullAnnotatedCheckerFrameworkSuperBuilder.java b/test/transform/resource/after-ecj/NullAnnotatedCheckerFrameworkSuperBuilder.java index 94b708d2..f4a1c992 100644 --- a/test/transform/resource/after-ecj/NullAnnotatedCheckerFrameworkSuperBuilder.java +++ b/test/transform/resource/after-ecj/NullAnnotatedCheckerFrameworkSuperBuilder.java @@ -11,8 +11,6 @@ class NullAnnotatedCheckerFrameworkSuperBuilder { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -56,6 +54,8 @@ class NullAnnotatedCheckerFrameworkSuperBuilder { this.names.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() { return (((((((("NullAnnotatedCheckerFrameworkSuperBuilder.Parent.ParentBuilder(x$value=" + this.x$value) + ", y=") + this.y) + ", z=") + this.z) + ", names=") + this.names) + ")"); } @@ -111,8 +111,6 @@ class NullAnnotatedCheckerFrameworkSuperBuilder { public ZChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -128,6 +126,8 @@ class NullAnnotatedCheckerFrameworkSuperBuilder { this.b = b; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() { return (((((("NullAnnotatedCheckerFrameworkSuperBuilder.ZChild.ZChildBuilder(super=" + super.toString()) + ", a$value=") + this.a$value) + ", b=") + this.b) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderAbstract.java b/test/transform/resource/after-ecj/SuperBuilderAbstract.java index 2fef9451..c5d97c45 100644 --- a/test/transform/resource/after-ecj/SuperBuilderAbstract.java +++ b/test/transform/resource/after-ecj/SuperBuilderAbstract.java @@ -5,8 +5,6 @@ public class SuperBuilderAbstract { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -14,6 +12,8 @@ public class SuperBuilderAbstract { this.parentField = parentField; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderAbstract.Parent.ParentBuilder(parentField=" + this.parentField) + ")"); } @@ -44,8 +44,6 @@ public class SuperBuilderAbstract { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -53,6 +51,8 @@ public class SuperBuilderAbstract { this.childField = childField; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderAbstract.Child.ChildBuilder(super=" + super.toString()) + ", childField=") + this.childField) + ")"); } @@ -69,8 +69,6 @@ public class SuperBuilderAbstract { public GrandChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -78,6 +76,8 @@ public class SuperBuilderAbstract { this.grandChildField = grandChildField; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderAbstract.GrandChild.GrandChildBuilder(super=" + super.toString()) + ", grandChildField=") + this.grandChildField) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java index 2d2cd422..0ed393e9 100644 --- a/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderAbstractToBuilder.java @@ -12,8 +12,6 @@ public class SuperBuilderAbstractToBuilder { private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.Parent instance, final SuperBuilderAbstractToBuilder.Parent.ParentBuilder<?, ?> b) { b.parentField(instance.parentField); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -21,6 +19,8 @@ public class SuperBuilderAbstractToBuilder { this.parentField = parentField; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderAbstractToBuilder.Parent.ParentBuilder(parentField=" + this.parentField) + ")"); } @@ -62,8 +62,6 @@ public class SuperBuilderAbstractToBuilder { private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.Child instance, final SuperBuilderAbstractToBuilder.Child.ChildBuilder<?, ?> b) { b.childField(instance.childField); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -71,6 +69,8 @@ public class SuperBuilderAbstractToBuilder { this.childField = childField; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderAbstractToBuilder.Child.ChildBuilder(super=" + super.toString()) + ", childField=") + this.childField) + ")"); } @@ -95,8 +95,6 @@ public class SuperBuilderAbstractToBuilder { private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderAbstractToBuilder.GrandChild instance, final SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder<?, ?> b) { b.grandChildField(instance.grandChildField); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -104,6 +102,8 @@ public class SuperBuilderAbstractToBuilder { this.grandChildField = grandChildField; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderAbstractToBuilder.GrandChild.GrandChildBuilder(super=" + super.toString()) + ", grandChildField=") + this.grandChildField) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderBasic.java b/test/transform/resource/after-ecj/SuperBuilderBasic.java index 844206d0..ad31a14b 100644 --- a/test/transform/resource/after-ecj/SuperBuilderBasic.java +++ b/test/transform/resource/after-ecj/SuperBuilderBasic.java @@ -7,8 +7,6 @@ public class SuperBuilderBasic { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -37,6 +35,8 @@ public class SuperBuilderBasic { this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderBasic.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } @@ -80,8 +80,6 @@ public class SuperBuilderBasic { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -89,6 +87,8 @@ public class SuperBuilderBasic { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderBasic.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java index 67ee62f6..f29dfd37 100644 --- a/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java @@ -21,8 +21,6 @@ public class SuperBuilderBasicToBuilder { b.obtainViaStaticMethod(SuperBuilderBasicToBuilder.Parent.staticMethod(instance)); b.items(((instance.items == null) ? java.util.Collections.<String>emptyList() : instance.items)); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -72,6 +70,8 @@ public class SuperBuilderBasicToBuilder { this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((((((("SuperBuilderBasicToBuilder.Parent.ParentBuilder(field1=" + this.field1) + ", obtainViaField=") + this.obtainViaField) + ", obtainViaMethod=") + this.obtainViaMethod) + ", obtainViaStaticMethod=") + this.obtainViaStaticMethod) + ", items=") + this.items) + ")"); } @@ -138,8 +138,6 @@ public class SuperBuilderBasicToBuilder { private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderBasicToBuilder.Child instance, final SuperBuilderBasicToBuilder.Child.ChildBuilder<?, ?> b) { b.field3(instance.field3); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -147,6 +145,8 @@ public class SuperBuilderBasicToBuilder { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderBasicToBuilder.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderCustomized.java b/test/transform/resource/after-ecj/SuperBuilderCustomized.java index 1fb41367..e84ffe14 100644 --- a/test/transform/resource/after-ecj/SuperBuilderCustomized.java +++ b/test/transform/resource/after-ecj/SuperBuilderCustomized.java @@ -60,8 +60,6 @@ public class SuperBuilderCustomized { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -69,6 +67,8 @@ public class SuperBuilderCustomized { this.field2 = field2; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderCustomized.Child.ChildBuilder(super=" + super.toString()) + ", field2=") + this.field2) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderInitializer.java b/test/transform/resource/after-ecj/SuperBuilderInitializer.java index 0425fb89..9143be94 100644 --- a/test/transform/resource/after-ecj/SuperBuilderInitializer.java +++ b/test/transform/resource/after-ecj/SuperBuilderInitializer.java @@ -6,8 +6,6 @@ class SuperBuilderInitializer { public OneBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -15,6 +13,8 @@ class SuperBuilderInitializer { this.world = world; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderInitializer.One.OneBuilder(world=" + this.world) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderNameClashes.java b/test/transform/resource/after-ecj/SuperBuilderNameClashes.java index 44d3db92..7f8507ce 100644 --- a/test/transform/resource/after-ecj/SuperBuilderNameClashes.java +++ b/test/transform/resource/after-ecj/SuperBuilderNameClashes.java @@ -68,8 +68,6 @@ public class SuperBuilderNameClashes { public CBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C3 build(); /** * @return {@code this}. */ @@ -77,6 +75,8 @@ public class SuperBuilderNameClashes { this.c2 = c2; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C3 build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderNameClashes.C.CBuilder(c2=" + this.c2) + ")"); } @@ -101,6 +101,41 @@ public class SuperBuilderNameClashes { return new SuperBuilderNameClashes.C.CBuilderImpl(); } } + interface B2 { + interface B4<X> { + } + } + interface B3<Y> { + } + public static @lombok.experimental.SuperBuilder class ExtendsClauseCollision extends B implements B2.B4<Object>, B3<Object> { + public static abstract @java.lang.SuppressWarnings("all") class ExtendsClauseCollisionBuilder<C extends SuperBuilderNameClashes.ExtendsClauseCollision, B4 extends SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilder<C, B4>> extends B.BBuilder<C, B4> { + public ExtendsClauseCollisionBuilder() { + super(); + } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B4 self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilder(super=" + super.toString()) + ")"); + } + } + private static final @java.lang.SuppressWarnings("all") class ExtendsClauseCollisionBuilderImpl extends SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilder<SuperBuilderNameClashes.ExtendsClauseCollision, SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilderImpl> { + private ExtendsClauseCollisionBuilderImpl() { + super(); + } + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilderImpl self() { + return this; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderNameClashes.ExtendsClauseCollision build() { + return new SuperBuilderNameClashes.ExtendsClauseCollision(this); + } + } + protected @java.lang.SuppressWarnings("all") ExtendsClauseCollision(final SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilder<?, ?> b) { + super(b); + } + public static @java.lang.SuppressWarnings("all") SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilder<?, ?> builder() { + return new SuperBuilderNameClashes.ExtendsClauseCollision.ExtendsClauseCollisionBuilderImpl(); + } + } public SuperBuilderNameClashes() { super(); } diff --git a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java index eac26153..1915e765 100644 --- a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java +++ b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java @@ -14,8 +14,6 @@ import lombok.Singular; public SuperBuilderSingularAnnotatedTypesBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.SuppressWarnings("all") B foo(final @MyAnnotation @NonNull String foo) { if ((foo == null)) { @@ -84,6 +82,8 @@ import lombok.Singular; } return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("SuperBuilderSingularAnnotatedTypes.SuperBuilderSingularAnnotatedTypesBuilder(foos=" + this.foos) + ", bars$key=") + this.bars$key) + ", bars$value=") + this.bars$value) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderSingularCustomized.java b/test/transform/resource/after-ecj/SuperBuilderSingularCustomized.java index 613edb03..da9d0c3b 100644 --- a/test/transform/resource/after-ecj/SuperBuilderSingularCustomized.java +++ b/test/transform/resource/after-ecj/SuperBuilderSingularCustomized.java @@ -8,8 +8,6 @@ import java.util.Set; public B custom(final String value) { return self(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.SuppressWarnings("all") B foo(final String foo) { if ((this.foos == null)) this.foos = new java.util.ArrayList<String>(); @@ -31,6 +29,8 @@ import java.util.Set; this.foos.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderSingularCustomized.SuperBuilderSingularCustomizedBuilder(foos=" + this.foos) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderSingularToBuilderGuava.java b/test/transform/resource/after-ecj/SuperBuilderSingularToBuilderGuava.java index 76a80781..62146b99 100644 --- a/test/transform/resource/after-ecj/SuperBuilderSingularToBuilderGuava.java +++ b/test/transform/resource/after-ecj/SuperBuilderSingularToBuilderGuava.java @@ -20,8 +20,6 @@ public class SuperBuilderSingularToBuilderGuava { b.passes(((instance.passes == null) ? com.google.common.collect.ImmutableSortedSet.<String>of() : instance.passes)); b.users(((instance.users == null) ? com.google.common.collect.ImmutableTable.<Number, Number, String>of() : instance.users)); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.SuppressWarnings("all") B card(final T card) { if ((this.cards == null)) this.cards = com.google.common.collect.ImmutableList.builder(); @@ -122,6 +120,8 @@ public class SuperBuilderSingularToBuilderGuava { this.users = null; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((((((("SuperBuilderSingularToBuilderGuava.Parent.ParentBuilder(cards=" + this.cards) + ", frogs=") + this.frogs) + ", rawSet=") + this.rawSet) + ", passes=") + this.passes) + ", users=") + this.users) + ")"); } @@ -176,8 +176,6 @@ public class SuperBuilderSingularToBuilderGuava { private static @java.lang.SuppressWarnings("all") <T>void $fillValuesFromInstanceIntoBuilder(final SuperBuilderSingularToBuilderGuava.Child<T> instance, final SuperBuilderSingularToBuilderGuava.Child.ChildBuilder<T, ?, ?> b) { b.field3(instance.field3); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -185,6 +183,8 @@ public class SuperBuilderSingularToBuilderGuava { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderSingularToBuilderGuava.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java b/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java index 93b78c3d..7706e788 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java @@ -7,8 +7,6 @@ public class SuperBuilderWithCustomBuilderMethod { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -37,6 +35,8 @@ public class SuperBuilderWithCustomBuilderMethod { this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithCustomBuilderMethod.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } @@ -80,8 +80,6 @@ public class SuperBuilderWithCustomBuilderMethod { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -89,6 +87,8 @@ public class SuperBuilderWithCustomBuilderMethod { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithCustomBuilderMethod.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java b/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java index 7c5a344a..b4edad5b 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java @@ -9,8 +9,6 @@ public class SuperBuilderWithDefaults { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -27,6 +25,8 @@ public class SuperBuilderWithDefaults { numberField$set = true; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithDefaults.Parent.ParentBuilder(millis$value=" + this.millis$value) + ", numberField$value=") + this.numberField$value) + ")"); } @@ -72,8 +72,6 @@ public class SuperBuilderWithDefaults { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -82,6 +80,8 @@ public class SuperBuilderWithDefaults { doubleField$set = true; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithDefaults.Child.ChildBuilder(super=" + super.toString()) + ", doubleField$value=") + this.doubleField$value) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithDefaultsAndTargetTyping.java b/test/transform/resource/after-ecj/SuperBuilderWithDefaultsAndTargetTyping.java index 20fe1351..d4744e9b 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithDefaultsAndTargetTyping.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithDefaultsAndTargetTyping.java @@ -8,8 +8,6 @@ public class SuperBuilderWithDefaultsAndTargetTyping { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -18,6 +16,8 @@ public class SuperBuilderWithDefaultsAndTargetTyping { foo$set = true; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderWithDefaultsAndTargetTyping.Parent.ParentBuilder(foo$value=" + this.foo$value) + ")"); } @@ -55,8 +55,6 @@ public class SuperBuilderWithDefaultsAndTargetTyping { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -65,6 +63,8 @@ public class SuperBuilderWithDefaultsAndTargetTyping { foo$set = true; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithDefaultsAndTargetTyping.Child.ChildBuilder(super=" + super.toString()) + ", foo$value=") + this.foo$value) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java index db989687..b8a4fab9 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java @@ -7,8 +7,6 @@ public class SuperBuilderWithGenerics { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -37,6 +35,8 @@ public class SuperBuilderWithGenerics { this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithGenerics.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } @@ -80,8 +80,6 @@ public class SuperBuilderWithGenerics { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -89,6 +87,8 @@ public class SuperBuilderWithGenerics { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithGenerics.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java index 96e681f4..d42f9d19 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java @@ -7,8 +7,6 @@ public class SuperBuilderWithGenerics2 { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -37,6 +35,8 @@ public class SuperBuilderWithGenerics2 { this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithGenerics2.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } @@ -80,8 +80,6 @@ public class SuperBuilderWithGenerics2 { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -89,6 +87,8 @@ public class SuperBuilderWithGenerics2 { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithGenerics2.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java index 8184bb05..0b369835 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics3.java @@ -6,8 +6,6 @@ public class SuperBuilderWithGenerics3 { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -15,6 +13,8 @@ public class SuperBuilderWithGenerics3 { this.str = str; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderWithGenerics3.Parent.ParentBuilder(str=" + this.str) + ")"); } @@ -50,8 +50,6 @@ public class SuperBuilderWithGenerics3 { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -59,6 +57,8 @@ public class SuperBuilderWithGenerics3 { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithGenerics3.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java index 829b50b9..e7d5dfae 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java @@ -16,8 +16,6 @@ public class SuperBuilderWithGenericsAndToBuilder { b.field1(instance.field1); b.items(((instance.items == null) ? java.util.Collections.<Integer, String>emptyMap() : instance.items)); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -60,6 +58,8 @@ public class SuperBuilderWithGenericsAndToBuilder { } return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder(field1=" + this.field1) + ", items$key=") + this.items$key) + ", items$value=") + this.items$value) + ")"); } @@ -117,8 +117,6 @@ public class SuperBuilderWithGenericsAndToBuilder { private static @java.lang.SuppressWarnings("all") <A>void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithGenericsAndToBuilder.Child<A> instance, final SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder<A, ?, ?> b) { b.field3(instance.field3); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -126,6 +124,8 @@ public class SuperBuilderWithGenericsAndToBuilder { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithGenericsAndToBuilder.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java index 28504f29..c7157649 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java @@ -7,8 +7,6 @@ public class SuperBuilderWithNonNull { public ParentBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -21,6 +19,8 @@ public class SuperBuilderWithNonNull { nonNullParentField$set = true; return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (("SuperBuilderWithNonNull.Parent.ParentBuilder(nonNullParentField$value=" + this.nonNullParentField$value) + ")"); } @@ -61,8 +61,6 @@ public class SuperBuilderWithNonNull { public ChildBuilder() { super(); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -74,6 +72,8 @@ public class SuperBuilderWithNonNull { this.nonNullChildField = nonNullChildField; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithNonNull.Child.ChildBuilder(super=" + super.toString()) + ", nonNullChildField=") + this.nonNullChildField) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithOverloadedGeneratedMethods.java b/test/transform/resource/after-ecj/SuperBuilderWithOverloadedGeneratedMethods.java new file mode 100644 index 00000000..1c5e25c2 --- /dev/null +++ b/test/transform/resource/after-ecj/SuperBuilderWithOverloadedGeneratedMethods.java @@ -0,0 +1,86 @@ +public class SuperBuilderWithOverloadedGeneratedMethods { + public static @lombok.experimental.SuperBuilder class Parent { + public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder<C extends SuperBuilderWithOverloadedGeneratedMethods.Parent, B extends SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilder<C, B>> { + private @java.lang.SuppressWarnings("all") int self; + public ParentBuilder() { + super(); + } + /** + * @return {@code this}. + */ + public @java.lang.SuppressWarnings("all") B self(final int self) { + this.self = self; + return self(); + } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilder(self=" + this.self) + ")"); + } + } + private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilder<SuperBuilderWithOverloadedGeneratedMethods.Parent, SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilderImpl> { + private ParentBuilderImpl() { + super(); + } + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilderImpl self() { + return this; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithOverloadedGeneratedMethods.Parent build() { + return new SuperBuilderWithOverloadedGeneratedMethods.Parent(this); + } + } + int self; + protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilder<?, ?> b) { + super(); + this.self = b.self; + } + public static @java.lang.SuppressWarnings("all") SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilder<?, ?> builder() { + return new SuperBuilderWithOverloadedGeneratedMethods.Parent.ParentBuilderImpl(); + } + } + public static @lombok.experimental.SuperBuilder class Child extends Parent { + public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder<C extends SuperBuilderWithOverloadedGeneratedMethods.Child, B extends SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilder<C, B>> extends Parent.ParentBuilder<C, B> { + private @java.lang.SuppressWarnings("all") double build; + public ChildBuilder() { + super(); + } + /** + * @return {@code this}. + */ + public @java.lang.SuppressWarnings("all") B build(final double build) { + this.build = build; + return self(); + } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((("SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilder(super=" + super.toString()) + ", build=") + this.build) + ")"); + } + } + private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilder<SuperBuilderWithOverloadedGeneratedMethods.Child, SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilderImpl> { + private ChildBuilderImpl() { + super(); + } + protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilderImpl self() { + return this; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderWithOverloadedGeneratedMethods.Child build() { + return new SuperBuilderWithOverloadedGeneratedMethods.Child(this); + } + } + double build; + protected @java.lang.SuppressWarnings("all") Child(final SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilder<?, ?> b) { + super(b); + this.build = b.build; + } + public static @java.lang.SuppressWarnings("all") SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilder<?, ?> builder() { + return new SuperBuilderWithOverloadedGeneratedMethods.Child.ChildBuilderImpl(); + } + } + public SuperBuilderWithOverloadedGeneratedMethods() { + super(); + } + public static void test() { + Child x = Child.builder().build(0.0).self(5).build(); + } +} diff --git a/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java b/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java index 303d53f6..ec035ba1 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java @@ -6,8 +6,6 @@ public SuperBuilderWithPrefixesBuilder() { super(); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -43,6 +41,8 @@ this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("SuperBuilderWithPrefixes.SuperBuilderWithPrefixesBuilder(field=" + this.field) + ", otherField=") + this.otherField) + ", items=") + this.items) + ")"); } diff --git a/test/transform/resource/after-ecj/SuperBuilderWithSetterPrefix.java b/test/transform/resource/after-ecj/SuperBuilderWithSetterPrefix.java index 3a1278c1..9f13b7ac 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithSetterPrefix.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithSetterPrefix.java @@ -21,8 +21,6 @@ public class SuperBuilderWithSetterPrefix { b.withObtainViaStaticMethod(SuperBuilderWithSetterPrefix.Parent.staticMethod(instance)); b.withItems(((instance.items == null) ? java.util.Collections.<String>emptyList() : instance.items)); } - protected abstract @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -72,6 +70,8 @@ public class SuperBuilderWithSetterPrefix { this.items.clear(); return self(); } + protected abstract @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((((((("SuperBuilderWithSetterPrefix.Parent.ParentBuilder(field1=" + this.field1) + ", obtainViaField=") + this.obtainViaField) + ", obtainViaMethod=") + this.obtainViaMethod) + ", obtainViaStaticMethod=") + this.obtainViaStaticMethod) + ", items=") + this.items) + ")"); } @@ -138,8 +138,6 @@ public class SuperBuilderWithSetterPrefix { private static @java.lang.SuppressWarnings("all") void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithSetterPrefix.Child instance, final SuperBuilderWithSetterPrefix.Child.ChildBuilder<?, ?> b) { b.setField3(instance.field3); } - protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); - public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); /** * @return {@code this}. */ @@ -147,6 +145,8 @@ public class SuperBuilderWithSetterPrefix { this.field3 = field3; return self(); } + protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self(); + public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build(); public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((("SuperBuilderWithSetterPrefix.Child.ChildBuilder(super=" + super.toString()) + ", field3=") + this.field3) + ")"); } |