From f071339508af4f233c579224a5e2028f2ba46489 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 20 Jan 2015 22:17:18 +0100 Subject: added the lombok.singular.auto config option. --- .../BuilderSingularNoAutosingularize.java | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java (limited to 'test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java') diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java b/test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java new file mode 100644 index 00000000..53bed757 --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java @@ -0,0 +1,105 @@ +import java.util.List; +import lombok.Singular; +@lombok.Builder class BuilderSingularNoAutosingularize { + public static @java.lang.SuppressWarnings("all") class BuilderSingularNoAutosingularizeBuilder { + private java.util.ArrayList things; + private java.util.ArrayList widgets; + private java.util.ArrayList items; + @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder things(String things) { + if ((this.things == null)) + this.things = new java.util.ArrayList(); + this.things.add(things); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder things(java.util.Collection things) { + if ((this.things == null)) + this.things = new java.util.ArrayList(); + this.things.addAll(things); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder widget(String widget) { + if ((this.widgets == null)) + this.widgets = new java.util.ArrayList(); + this.widgets.add(widget); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder widgets(java.util.Collection widgets) { + if ((this.widgets == null)) + this.widgets = new java.util.ArrayList(); + this.widgets.addAll(widgets); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder items(String items) { + if ((this.items == null)) + this.items = new java.util.ArrayList(); + this.items.add(items); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder items(java.util.Collection items) { + if ((this.items == null)) + this.items = new java.util.ArrayList(); + this.items.addAll(items); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularize build() { + java.util.List things; + switch (((this.things == null) ? 0 : this.things.size())) { + case 0 : + things = java.util.Collections.emptyList(); + break; + case 1 : + things = java.util.Collections.singletonList(this.things.get(0)); + break; + default : + things = new java.util.ArrayList(this.things.size()); + things.addAll(this.things); + things = java.util.Collections.unmodifiableList(things); + } + java.util.List widgets; + switch (((this.widgets == null) ? 0 : this.widgets.size())) { + case 0 : + widgets = java.util.Collections.emptyList(); + break; + case 1 : + widgets = java.util.Collections.singletonList(this.widgets.get(0)); + break; + default : + widgets = new java.util.ArrayList(this.widgets.size()); + widgets.addAll(this.widgets); + widgets = java.util.Collections.unmodifiableList(widgets); + } + java.util.List items; + switch (((this.items == null) ? 0 : this.items.size())) { + case 0 : + items = java.util.Collections.emptyList(); + break; + case 1 : + items = java.util.Collections.singletonList(this.items.get(0)); + break; + default : + items = new java.util.ArrayList(this.items.size()); + items.addAll(this.items); + items = java.util.Collections.unmodifiableList(items); + } + return new BuilderSingularNoAutosingularize(things, widgets, items); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((("BuilderSingularNoAutosingularize.BuilderSingularNoAutosingularizeBuilder(things=" + this.things) + ", widgets=") + this.widgets) + ", items=") + this.items) + ")"); + } + } + private @Singular List things; + private @Singular("widget") List widgets; + private @Singular List items; + @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularize(final List things, final List widgets, final List items) { + super(); + this.things = things; + this.widgets = widgets; + this.items = items; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularNoAutosingularizeBuilder builder() { + return new BuilderSingularNoAutosingularizeBuilder(); + } +} -- cgit