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 BuilderWithToBuilder.BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilder.BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilder.BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") public BuilderWithToBuilder.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 BuilderWithToBuilder.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 BuilderWithToBuilder.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(this.one, this.two, this.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 BuilderWithToBuilder.BuilderWithToBuilderBuilder builder() { return new BuilderWithToBuilder.BuilderWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") public BuilderWithToBuilder.BuilderWithToBuilderBuilder toBuilder() { final BuilderWithToBuilder.BuilderWithToBuilderBuilder builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)); if (this.bars != null) builder.bars(this.bars); return builder; } } class ConstructorWithToBuilder { private String mOne; private String mTwo; private T foo; @lombok.Singular private com.google.common.collect.ImmutableList bars; public ConstructorWithToBuilder(String mOne, T baz, com.google.common.collect.ImmutableList bars) { } @java.lang.SuppressWarnings("all") public static class ConstructorWithToBuilderBuilder { @java.lang.SuppressWarnings("all") private String mOne; @java.lang.SuppressWarnings("all") private T baz; @java.lang.SuppressWarnings("all") private com.google.common.collect.ImmutableList bars; @java.lang.SuppressWarnings("all") ConstructorWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder baz(final T baz) { this.baz = baz; return this; } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder bars(final com.google.common.collect.ImmutableList bars) { this.bars = bars; return this; } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilder build() { return new ConstructorWithToBuilder(this.mOne, this.baz, this.bars); } @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { return "ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne + ", baz=" + this.baz + ", bars=" + this.bars + ")"; } } @java.lang.SuppressWarnings("all") public static ConstructorWithToBuilder.ConstructorWithToBuilderBuilder builder() { return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder toBuilder() { return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder().mOne(this.mOne).baz(this.foo).bars(this.bars); } }