From 5d35fe3bfbd46de7410bca96e29731e8f5236618 Mon Sep 17 00:00:00 2001 From: Jan Rieke Date: Mon, 14 May 2018 17:59:45 +0200 Subject: ecj: method body for self(); type args for BuilderImpl extends clause --- .../resource/after-ecj/SuperBuilderBasic.java | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'test/transform/resource/after-ecj') diff --git a/test/transform/resource/after-ecj/SuperBuilderBasic.java b/test/transform/resource/after-ecj/SuperBuilderBasic.java index 7315760c..d293c8f8 100644 --- a/test/transform/resource/after-ecj/SuperBuilderBasic.java +++ b/test/transform/resource/after-ecj/SuperBuilderBasic.java @@ -12,27 +12,28 @@ public class SuperBuilderBasic { } public @java.lang.SuppressWarnings("all") B item(String item) { if ((this.items == null)) - this.items = new java.util.ArrayList(); + this.items = new java.util.ArrayList(); this.items.add(item); return self(); } public @java.lang.SuppressWarnings("all") B items(java.util.Collection items) { if ((this.items == null)) - this.items = new java.util.ArrayList(); + this.items = new java.util.ArrayList(); this.items.addAll(items); return self(); } public @java.lang.SuppressWarnings("all") B clearItems() { if ((this.items != null)) - this.items.clear(); + this.items.clear(); return self(); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return "SuperBuilderBasic.Parent.ParentBuilder(field1=" + this.field1 + ", items=" + this.items + ")"; + return (((("SuperBuilderBasic.Parent.ParentBuilder(field1=" + this.field1) + ", items=") + this.items) + ")"); } } private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder { private @java.lang.SuppressWarnings("all") ParentBuilderImpl() { + super(); } protected @java.lang.Override @java.lang.SuppressWarnings("all") ParentBuilderImpl self() { return this; @@ -41,26 +42,27 @@ public class SuperBuilderBasic { return new Parent(this); } } - public @java.lang.SuppressWarnings("all") static ParentBuilder builder() { - return new ParentBuilderImpl(); - } int field1; @lombok.Singular List items; protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder b) { + super(); this.field1 = b.field1; java.util.List items; - switch (b.items == null ? 0 : b.items.size()) { - case 0: - items = java.util.Collections.emptyList(); - break; - case 1: - items = java.util.Collections.singletonList(b.items.get(0)); - break; - default: - items = java.util.Collections.unmodifiableList(new java.util.ArrayList(b.items)); + switch (((b.items == null) ? 0 : b.items.size())) { + case 0 : + items = java.util.Collections.emptyList(); + break; + case 1 : + items = java.util.Collections.singletonList(b.items.get(0)); + break; + default : + items = java.util.Collections.unmodifiableList(new java.util.ArrayList(b.items)); } this.items = items; } + public static @java.lang.SuppressWarnings("all") ParentBuilder builder() { + return new ParentBuilderImpl(); + } } public static @lombok.experimental.SuperBuilder class Child extends Parent { -- cgit