import java.util.List; class BuilderWithToBuilder { private String mOne; private String mTwo; private T foo; private List bars; public static K rrr(BuilderWithToBuilder x) { return x.foo; } @java.lang.SuppressWarnings("all") BuilderWithToBuilder(final String one, final String two, final T foo, final List bars) { this.mOne = one; this.mTwo = two; this.foo = foo; this.bars = bars; } @java.lang.SuppressWarnings("all") public static class BuilderWithToBuilderBuilder { @java.lang.SuppressWarnings("all") private String one; @java.lang.SuppressWarnings("all") private String two; @java.lang.SuppressWarnings("all") private T foo; @java.lang.SuppressWarnings("all") private java.util.ArrayList bars; @java.lang.SuppressWarnings("all") BuilderWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder bar(final T bar) { if (this.bars == null) this.bars = new java.util.ArrayList(); this.bars.add(bar); return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder bars(final java.util.Collection bars) { if (this.bars == null) this.bars = new java.util.ArrayList(); this.bars.addAll(bars); return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder clearBars() { if (this.bars != null) this.bars.clear(); return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilder build() { java.util.List bars; switch (this.bars == null ? 0 : this.bars.size()) { case 0: bars = java.util.Collections.emptyList(); break; case 1: bars = java.util.Collections.singletonList(this.bars.get(0)); break; default: bars = java.util.Collections.unmodifiableList(new java.util.ArrayList(this.bars)); } return new BuilderWithToBuilder(one, two, foo, bars); } @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { return "BuilderWithToBuilder.BuilderWithToBuilderBuilder(one=" + this.one + ", two=" + this.two + ", foo=" + this.foo + ", bars=" + this.bars + ")"; } } @java.lang.SuppressWarnings("all") public static BuilderWithToBuilderBuilder builder() { return new BuilderWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") public BuilderWithToBuilderBuilder toBuilder() { return new BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars); } } class ConstructorWithToBuilder { private String mOne; private String mTwo; private T foo; @lombok.Singular private List bars; public ConstructorWithToBuilder(String mOne, T bar) { } @java.lang.SuppressWarnings("all") public static class ConstructorWithToBuilderBuilder { @java.lang.SuppressWarnings("all") private String mOne; @java.lang.SuppressWarnings("all") private T bar; @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilderBuilder bar(final T bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilder build() { return new ConstructorWithToBuilder(mOne, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { return "ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")"; } } @java.lang.SuppressWarnings("all") public static ConstructorWithToBuilderBuilder builder() { return new ConstructorWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilderBuilder toBuilder() { return new ConstructorWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } } class StaticWithToBuilder { private String mOne; private String mTwo; private T foo; private K bar; @lombok.Singular private List bars; public static StaticWithToBuilder test(String mOne, Z bar) { return new StaticWithToBuilder(); } @java.lang.SuppressWarnings("all") public static class StaticWithToBuilderBuilder { @java.lang.SuppressWarnings("all") private String mOne; @java.lang.SuppressWarnings("all") private Z bar; @java.lang.SuppressWarnings("all") StaticWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") public StaticWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") public StaticWithToBuilderBuilder bar(final Z bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") public StaticWithToBuilder build() { return StaticWithToBuilder.test(mOne, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { return "StaticWithToBuilder.StaticWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")"; } } @java.lang.SuppressWarnings("all") public static StaticWithToBuilderBuilder builder() { return new StaticWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") public StaticWithToBuilderBuilder toBuilder() { return new StaticWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } }