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") @javax.annotation.Generated("lombok") 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") @javax.annotation.Generated("lombok") public static class BuilderWithToBuilderBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private String one; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private String two; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private T foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private java.util.ArrayList bars; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") 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") @javax.annotation.Generated("lombok") 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") @javax.annotation.Generated("lombok") 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") @javax.annotation.Generated("lombok") public java.lang.String toString() { return "BuilderWithToBuilder.BuilderWithToBuilderBuilder(one=" + this.one + ", two=" + this.two + ", foo=" + this.foo + ", bars=" + this.bars + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public static BuilderWithToBuilderBuilder builder() { return new BuilderWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") 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") @javax.annotation.Generated("lombok") public static class ConstructorWithToBuilderBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private String mOne; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private T bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public ConstructorWithToBuilderBuilder bar(final T bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public ConstructorWithToBuilder build() { return new ConstructorWithToBuilder(mOne, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public java.lang.String toString() { return "ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public static ConstructorWithToBuilderBuilder builder() { return new ConstructorWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") 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") @javax.annotation.Generated("lombok") public static class StaticWithToBuilderBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private String mOne; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") private Z bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public StaticWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public StaticWithToBuilderBuilder bar(final Z bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public StaticWithToBuilder build() { return StaticWithToBuilder.test(mOne, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public java.lang.String toString() { return "StaticWithToBuilder.StaticWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public static StaticWithToBuilderBuilder builder() { return new StaticWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public StaticWithToBuilderBuilder toBuilder() { return new StaticWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } }