import java.util.List; import lombok.Builder; @Builder(toBuilder = true,setterPrefix = "with") @lombok.experimental.Accessors(prefix = "m") class BuilderWithToBuilderWithSetterPrefix { public static @java.lang.SuppressWarnings("all") class BuilderWithToBuilderWithSetterPrefixBuilder { private @java.lang.SuppressWarnings("all") String one; private @java.lang.SuppressWarnings("all") String two; private @java.lang.SuppressWarnings("all") T foo; private @java.lang.SuppressWarnings("all") java.util.ArrayList bars; @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder() { super(); } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withOne(final String one) { this.one = one; return this; } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withTwo(final String two) { this.two = two; return this; } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withFoo(final T foo) { this.foo = foo; return this; } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withBar(final T bar) { if ((this.bars == null)) this.bars = new java.util.ArrayList(); this.bars.add(bar); return this; } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder withBars(final java.util.Collection bars) { if ((this.bars == null)) this.bars = new java.util.ArrayList(); this.bars.addAll(bars); return this; } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder clearBars() { if ((this.bars != null)) this.bars.clear(); return this; } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefix 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 BuilderWithToBuilderWithSetterPrefix(one, two, foo, bars); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((((("BuilderWithToBuilderWithSetterPrefix.BuilderWithToBuilderWithSetterPrefixBuilder(one=" + this.one) + ", two=") + this.two) + ", foo=") + this.foo) + ", bars=") + this.bars) + ")"); } } private String mOne; private String mTwo; private @Builder.ObtainVia(method = "rrr",isStatic = true) T foo; private @lombok.Singular List bars; public static K rrr(BuilderWithToBuilderWithSetterPrefix x) { return x.foo; } @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefix(final String one, final String two, final T foo, final List bars) { super(); this.mOne = one; this.mTwo = two; this.foo = foo; this.bars = bars; } public static @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder builder() { return new BuilderWithToBuilderWithSetterPrefixBuilder(); } public @java.lang.SuppressWarnings("all") BuilderWithToBuilderWithSetterPrefixBuilder toBuilder() { final BuilderWithToBuilderWithSetterPrefixBuilder builder = new BuilderWithToBuilderWithSetterPrefixBuilder().withOne(this.mOne).withTwo(this.mTwo).withFoo(BuilderWithToBuilderWithSetterPrefix.rrr(this)); if ((this.bars != null)) builder.withBars(this.bars); return builder; } } @lombok.experimental.Accessors(prefix = "m") class ConstructorWithToBuilderWithSetterPrefix { public static @java.lang.SuppressWarnings("all") class ConstructorWithToBuilderWithSetterPrefixBuilder { private @java.lang.SuppressWarnings("all") String mOne; private @java.lang.SuppressWarnings("all") T baz; private @java.lang.SuppressWarnings("all") com.google.common.collect.ImmutableList bars; @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder() { super(); } public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder withMOne(final String mOne) { this.mOne = mOne; return this; } public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder withBaz(final T baz) { this.baz = baz; return this; } public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder withBars(final com.google.common.collect.ImmutableList bars) { this.bars = bars; return this; } public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefix build() { return new ConstructorWithToBuilderWithSetterPrefix(mOne, baz, bars); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("ConstructorWithToBuilderWithSetterPrefix.ConstructorWithToBuilderWithSetterPrefixBuilder(mOne=" + this.mOne) + ", baz=") + this.baz) + ", bars=") + this.bars) + ")"); } } private String mOne; private String mTwo; private T foo; private @lombok.Singular com.google.common.collect.ImmutableList bars; public @Builder(toBuilder = true,setterPrefix = "with") ConstructorWithToBuilderWithSetterPrefix(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList bars) { super(); } public static @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder builder() { return new ConstructorWithToBuilderWithSetterPrefixBuilder(); } public @java.lang.SuppressWarnings("all") ConstructorWithToBuilderWithSetterPrefixBuilder toBuilder() { return new ConstructorWithToBuilderWithSetterPrefixBuilder().withMOne(this.mOne).withBaz(this.foo).withBars(this.bars); } }