From 19de8fbe4743afc58df39555602c67e46fc2e016 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 20 Jan 2015 22:24:40 +0100 Subject: brainfarted ‘singleton’ where I meant ‘singular’ in all the test files. Whoops! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BuilderSingletonGuavaListsSets.java | 93 ----------- .../after-delombok/BuilderSingletonGuavaMaps.java | 76 --------- .../after-delombok/BuilderSingletonLists.java | 111 ------------- .../after-delombok/BuilderSingletonMaps.java | 173 -------------------- .../BuilderSingletonRedirectToGuava.java | 75 --------- .../after-delombok/BuilderSingletonSets.java | 129 --------------- .../BuilderSingularGuavaListsSets.java | 93 +++++++++++ .../after-delombok/BuilderSingularGuavaMaps.java | 76 +++++++++ .../after-delombok/BuilderSingularLists.java | 111 +++++++++++++ .../after-delombok/BuilderSingularMaps.java | 173 ++++++++++++++++++++ .../BuilderSingularRedirectToGuava.java | 75 +++++++++ .../after-delombok/BuilderSingularSets.java | 129 +++++++++++++++ .../after-ecj/BuilderSingletonGuavaListsSets.java | 88 ---------- .../after-ecj/BuilderSingletonGuavaMaps.java | 71 --------- .../resource/after-ecj/BuilderSingletonLists.java | 107 ------------- .../resource/after-ecj/BuilderSingletonMaps.java | 177 --------------------- .../after-ecj/BuilderSingletonRedirectToGuava.java | 71 --------- .../resource/after-ecj/BuilderSingletonSets.java | 125 --------------- .../after-ecj/BuilderSingularGuavaListsSets.java | 88 ++++++++++ .../after-ecj/BuilderSingularGuavaMaps.java | 71 +++++++++ .../resource/after-ecj/BuilderSingularLists.java | 107 +++++++++++++ .../resource/after-ecj/BuilderSingularMaps.java | 177 +++++++++++++++++++++ .../after-ecj/BuilderSingularRedirectToGuava.java | 71 +++++++++ .../resource/after-ecj/BuilderSingularSets.java | 125 +++++++++++++++ .../before/BuilderSingletonGuavaListsSets.java | 14 -- .../resource/before/BuilderSingletonGuavaMaps.java | 12 -- .../resource/before/BuilderSingletonLists.java | 11 -- .../resource/before/BuilderSingletonMaps.java | 12 -- .../before/BuilderSingletonRedirectToGuava.java | 13 -- .../resource/before/BuilderSingletonSets.java | 12 -- .../before/BuilderSingularGuavaListsSets.java | 14 ++ .../resource/before/BuilderSingularGuavaMaps.java | 12 ++ .../resource/before/BuilderSingularLists.java | 11 ++ .../resource/before/BuilderSingularMaps.java | 12 ++ .../before/BuilderSingularRedirectToGuava.java | 13 ++ .../resource/before/BuilderSingularSets.java | 12 ++ 36 files changed, 1370 insertions(+), 1370 deletions(-) delete mode 100644 test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingletonLists.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingletonMaps.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java delete mode 100644 test/transform/resource/after-delombok/BuilderSingletonSets.java create mode 100644 test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java create mode 100644 test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java create mode 100644 test/transform/resource/after-delombok/BuilderSingularLists.java create mode 100644 test/transform/resource/after-delombok/BuilderSingularMaps.java create mode 100644 test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java create mode 100644 test/transform/resource/after-delombok/BuilderSingularSets.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingletonLists.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingletonMaps.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java delete mode 100644 test/transform/resource/after-ecj/BuilderSingletonSets.java create mode 100644 test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java create mode 100644 test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java create mode 100644 test/transform/resource/after-ecj/BuilderSingularLists.java create mode 100644 test/transform/resource/after-ecj/BuilderSingularMaps.java create mode 100644 test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java create mode 100644 test/transform/resource/after-ecj/BuilderSingularSets.java delete mode 100644 test/transform/resource/before/BuilderSingletonGuavaListsSets.java delete mode 100644 test/transform/resource/before/BuilderSingletonGuavaMaps.java delete mode 100644 test/transform/resource/before/BuilderSingletonLists.java delete mode 100644 test/transform/resource/before/BuilderSingletonMaps.java delete mode 100644 test/transform/resource/before/BuilderSingletonRedirectToGuava.java delete mode 100644 test/transform/resource/before/BuilderSingletonSets.java create mode 100644 test/transform/resource/before/BuilderSingularGuavaListsSets.java create mode 100644 test/transform/resource/before/BuilderSingularGuavaMaps.java create mode 100644 test/transform/resource/before/BuilderSingularLists.java create mode 100644 test/transform/resource/before/BuilderSingularMaps.java create mode 100644 test/transform/resource/before/BuilderSingularRedirectToGuava.java create mode 100644 test/transform/resource/before/BuilderSingularSets.java diff --git a/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java b/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java deleted file mode 100644 index 4503f2bb..00000000 --- a/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java +++ /dev/null @@ -1,93 +0,0 @@ -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableCollection; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; -class BuilderSingletonGuavaListsSets { - private ImmutableList cards; - private ImmutableCollection frogs; - @SuppressWarnings("all") - private ImmutableSet rawSet; - private ImmutableSortedSet passes; - @java.lang.SuppressWarnings("all") - BuilderSingletonGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes) { - this.cards = cards; - this.frogs = frogs; - this.rawSet = rawSet; - this.passes = passes; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingletonGuavaListsSetsBuilder { - private com.google.common.collect.ImmutableList.Builder cards; - private com.google.common.collect.ImmutableList.Builder frogs; - private com.google.common.collect.ImmutableSet.Builder rawSet; - private com.google.common.collect.ImmutableSortedSet.Builder passes; - @java.lang.SuppressWarnings("all") - BuilderSingletonGuavaListsSetsBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder card(final T card) { - if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.add(card); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { - if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.addAll(cards); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder frog(final Number frog) { - if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.add(frog); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { - if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.addAll(frogs); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { - if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.add(rawSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { - if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.addAll(rawSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder pass(final String pass) { - if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.add(pass); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { - if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.addAll(passes); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaListsSets build() { - com.google.common.collect.ImmutableList cards = this.cards == null ? com.google.common.collect.ImmutableList.of() : this.cards.build(); - com.google.common.collect.ImmutableCollection frogs = this.frogs == null ? com.google.common.collect.ImmutableList.of() : this.frogs.build(); - com.google.common.collect.ImmutableSet rawSet = this.rawSet == null ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build(); - com.google.common.collect.ImmutableSortedSet passes = this.passes == null ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build(); - return new BuilderSingletonGuavaListsSets(cards, frogs, rawSet, passes); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingletonGuavaListsSets.BuilderSingletonGuavaListsSetsBuilder(cards=" + this.cards + ", frogs=" + this.frogs + ", rawSet=" + this.rawSet + ", passes=" + this.passes + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingletonGuavaListsSetsBuilder builder() { - return new BuilderSingletonGuavaListsSetsBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java b/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java deleted file mode 100644 index ff39da32..00000000 --- a/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java +++ /dev/null @@ -1,76 +0,0 @@ -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableSortedMap; -class BuilderSingletonGuavaMaps { - private ImmutableMap battleaxes; - private ImmutableSortedMap vertices; - @SuppressWarnings("all") - private ImmutableBiMap rawMap; - @java.lang.SuppressWarnings("all") - BuilderSingletonGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { - this.battleaxes = battleaxes; - this.vertices = vertices; - this.rawMap = rawMap; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingletonGuavaMapsBuilder { - private com.google.common.collect.ImmutableMap.Builder battleaxes; - private com.google.common.collect.ImmutableSortedMap.Builder vertices; - private com.google.common.collect.ImmutableBiMap.Builder rawMap; - @java.lang.SuppressWarnings("all") - BuilderSingletonGuavaMapsBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMapsBuilder battleaxe(final K battleaxe$key, final V battleaxe$value) { - if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.put(battleaxe$key, battleaxe$value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { - if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.putAll(battleaxes); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMapsBuilder vertex(final Integer vertex$key, final V vertex$value) { - if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.put(vertex$key, vertex$value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMapsBuilder vertices(final java.util.Map vertices) { - if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.putAll(vertices); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMapsBuilder rawMap(final java.lang.Object rawMap$key, final java.lang.Object rawMap$value) { - if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.put(rawMap$key, rawMap$value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMapsBuilder rawMap(final java.util.Map rawMap) { - if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.putAll(rawMap); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonGuavaMaps build() { - com.google.common.collect.ImmutableMap battleaxes = this.battleaxes == null ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build(); - com.google.common.collect.ImmutableSortedMap vertices = this.vertices == null ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build(); - com.google.common.collect.ImmutableBiMap rawMap = this.rawMap == null ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build(); - return new BuilderSingletonGuavaMaps(battleaxes, vertices, rawMap); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingletonGuavaMaps.BuilderSingletonGuavaMapsBuilder(battleaxes=" + this.battleaxes + ", vertices=" + this.vertices + ", rawMap=" + this.rawMap + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingletonGuavaMapsBuilder builder() { - return new BuilderSingletonGuavaMapsBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingletonLists.java b/test/transform/resource/after-delombok/BuilderSingletonLists.java deleted file mode 100644 index 1c93f40a..00000000 --- a/test/transform/resource/after-delombok/BuilderSingletonLists.java +++ /dev/null @@ -1,111 +0,0 @@ -import java.util.List; -import java.util.Collection; -class BuilderSingletonLists { - private List children; - private Collection scarves; - @SuppressWarnings("all") - private List rawList; - @java.lang.SuppressWarnings("all") - BuilderSingletonLists(final List children, final Collection scarves, final List rawList) { - this.children = children; - this.scarves = scarves; - this.rawList = rawList; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingletonListsBuilder { - private java.util.ArrayList children; - private java.util.ArrayList scarves; - private java.util.ArrayList rawList; - @java.lang.SuppressWarnings("all") - BuilderSingletonListsBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonListsBuilder child(final T child) { - if (this.children == null) this.children = new java.util.ArrayList(); - this.children.add(child); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonListsBuilder children(final java.util.Collection children) { - if (this.children == null) this.children = new java.util.ArrayList(); - this.children.addAll(children); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonListsBuilder scarf(final Number scarf) { - if (this.scarves == null) this.scarves = new java.util.ArrayList(); - this.scarves.add(scarf); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonListsBuilder scarves(final java.util.Collection scarves) { - if (this.scarves == null) this.scarves = new java.util.ArrayList(); - this.scarves.addAll(scarves); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonListsBuilder rawList(final java.lang.Object rawList) { - if (this.rawList == null) this.rawList = new java.util.ArrayList(); - this.rawList.add(rawList); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonListsBuilder rawList(final java.util.Collection rawList) { - if (this.rawList == null) this.rawList = new java.util.ArrayList(); - this.rawList.addAll(rawList); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonLists build() { - java.util.List children; - switch (this.children == null ? 0 : this.children.size()) { - case 0: - children = java.util.Collections.emptyList(); - break; - case 1: - children = java.util.Collections.singletonList(this.children.get(0)); - break; - default: - children = new java.util.ArrayList(this.children.size()); - children.addAll(this.children); - children = java.util.Collections.unmodifiableList(children); - } - java.util.List scarves; - switch (this.scarves == null ? 0 : this.scarves.size()) { - case 0: - scarves = java.util.Collections.emptyList(); - break; - case 1: - scarves = java.util.Collections.singletonList(this.scarves.get(0)); - break; - default: - scarves = new java.util.ArrayList(this.scarves.size()); - scarves.addAll(this.scarves); - scarves = java.util.Collections.unmodifiableList(scarves); - } - java.util.List rawList; - switch (this.rawList == null ? 0 : this.rawList.size()) { - case 0: - rawList = java.util.Collections.emptyList(); - break; - case 1: - rawList = java.util.Collections.singletonList(this.rawList.get(0)); - break; - default: - rawList = new java.util.ArrayList(this.rawList.size()); - rawList.addAll(this.rawList); - rawList = java.util.Collections.unmodifiableList(rawList); - } - return new BuilderSingletonLists(children, scarves, rawList); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingletonLists.BuilderSingletonListsBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingletonListsBuilder builder() { - return new BuilderSingletonListsBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingletonMaps.java b/test/transform/resource/after-delombok/BuilderSingletonMaps.java deleted file mode 100644 index a6474975..00000000 --- a/test/transform/resource/after-delombok/BuilderSingletonMaps.java +++ /dev/null @@ -1,173 +0,0 @@ -import java.util.Map; -import java.util.SortedMap; -class BuilderSingletonMaps { - private Map women; - private SortedMap men; - @SuppressWarnings("all") - private Map rawMap; - private Map stringMap; - @java.lang.SuppressWarnings("all") - BuilderSingletonMaps(final Map women, final SortedMap men, final Map rawMap, final Map stringMap) { - this.women = women; - this.men = men; - this.rawMap = rawMap; - this.stringMap = stringMap; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingletonMapsBuilder { - private java.util.ArrayList women$key; - private java.util.ArrayList women$value; - private java.util.ArrayList men$key; - private java.util.ArrayList men$value; - private java.util.ArrayList rawMap$key; - private java.util.ArrayList rawMap$value; - private java.util.ArrayList stringMap$key; - private java.util.ArrayList stringMap$value; - @java.lang.SuppressWarnings("all") - BuilderSingletonMapsBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder woman(final K womanKey, final V womanValue) { - if (this.women$key == null) { - this.women$key = new java.util.ArrayList(); - this.women$value = new java.util.ArrayList(); - } - this.women$key.add(womanKey); - this.women$value.add(womanValue); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder women(final java.util.Map women) { - if (this.women$key == null) { - this.women$key = new java.util.ArrayList(); - this.women$value = new java.util.ArrayList(); - } - for (final java.util.Map.Entry $lombokEntry : women.entrySet()) { - this.women$key.add($lombokEntry.getKey()); - this.women$value.add($lombokEntry.getValue()); - } - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder man(final K manKey, final Number manValue) { - if (this.men$key == null) { - this.men$key = new java.util.ArrayList(); - this.men$value = new java.util.ArrayList(); - } - this.men$key.add(manKey); - this.men$value.add(manValue); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder men(final java.util.Map men) { - if (this.men$key == null) { - this.men$key = new java.util.ArrayList(); - this.men$value = new java.util.ArrayList(); - } - for (final java.util.Map.Entry $lombokEntry : men.entrySet()) { - this.men$key.add($lombokEntry.getKey()); - this.men$value.add($lombokEntry.getValue()); - } - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder rawMap(final java.lang.Object rawMapKey, final java.lang.Object rawMapValue) { - if (this.rawMap$key == null) { - this.rawMap$key = new java.util.ArrayList(); - this.rawMap$value = new java.util.ArrayList(); - } - this.rawMap$key.add(rawMapKey); - this.rawMap$value.add(rawMapValue); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder rawMap(final java.util.Map rawMap) { - if (this.rawMap$key == null) { - this.rawMap$key = new java.util.ArrayList(); - this.rawMap$value = new java.util.ArrayList(); - } - for (final java.util.Map.Entry $lombokEntry : rawMap.entrySet()) { - this.rawMap$key.add($lombokEntry.getKey()); - this.rawMap$value.add($lombokEntry.getValue()); - } - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder stringMap(final String stringMapKey, final V stringMapValue) { - if (this.stringMap$key == null) { - this.stringMap$key = new java.util.ArrayList(); - this.stringMap$value = new java.util.ArrayList(); - } - this.stringMap$key.add(stringMapKey); - this.stringMap$value.add(stringMapValue); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMapsBuilder stringMap(final java.util.Map stringMap) { - if (this.stringMap$key == null) { - this.stringMap$key = new java.util.ArrayList(); - this.stringMap$value = new java.util.ArrayList(); - } - for (final java.util.Map.Entry $lombokEntry : stringMap.entrySet()) { - this.stringMap$key.add($lombokEntry.getKey()); - this.stringMap$value.add($lombokEntry.getValue()); - } - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonMaps build() { - java.util.Map women; - switch (this.women$key == null ? 0 : this.women$key.size()) { - case 0: - women = java.util.Collections.emptyMap(); - break; - case 1: - women = java.util.Collections.singletonMap(this.women$key.get(0), this.women$value.get(0)); - break; - default: - women = new java.util.LinkedHashMap(this.women$key.size() < 1073741824 ? 1 + this.women$key.size() + (this.women$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - for (int $i = 0; $i < this.women$key.size(); $i++) women.put(this.women$key.get($i), this.women$value.get($i)); - women = java.util.Collections.unmodifiableMap(women); - } - java.util.SortedMap men = new java.util.TreeMap(); - if (this.men$key != null) for (int $i = 0; $i < (this.men$key == null ? 0 : this.men$key.size()); $i++) men.put(this.men$key.get($i), this.men$value.get($i)); - men = java.util.Collections.unmodifiableSortedMap(men); - java.util.Map rawMap; - switch (this.rawMap$key == null ? 0 : this.rawMap$key.size()) { - case 0: - rawMap = java.util.Collections.emptyMap(); - break; - case 1: - rawMap = java.util.Collections.singletonMap(this.rawMap$key.get(0), this.rawMap$value.get(0)); - break; - default: - rawMap = new java.util.LinkedHashMap(this.rawMap$key.size() < 1073741824 ? 1 + this.rawMap$key.size() + (this.rawMap$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - for (int $i = 0; $i < this.rawMap$key.size(); $i++) rawMap.put(this.rawMap$key.get($i), this.rawMap$value.get($i)); - rawMap = java.util.Collections.unmodifiableMap(rawMap); - } - java.util.Map stringMap; - switch (this.stringMap$key == null ? 0 : this.stringMap$key.size()) { - case 0: - stringMap = java.util.Collections.emptyMap(); - break; - case 1: - stringMap = java.util.Collections.singletonMap(this.stringMap$key.get(0), this.stringMap$value.get(0)); - break; - default: - stringMap = new java.util.LinkedHashMap(this.stringMap$key.size() < 1073741824 ? 1 + this.stringMap$key.size() + (this.stringMap$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - for (int $i = 0; $i < this.stringMap$key.size(); $i++) stringMap.put(this.stringMap$key.get($i), this.stringMap$value.get($i)); - stringMap = java.util.Collections.unmodifiableMap(stringMap); - } - return new BuilderSingletonMaps(women, men, rawMap, stringMap); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingletonMaps.BuilderSingletonMapsBuilder(women$key=" + this.women$key + ", women$value=" + this.women$value + ", men$key=" + this.men$key + ", men$value=" + this.men$value + ", rawMap$key=" + this.rawMap$key + ", rawMap$value=" + this.rawMap$value + ", stringMap$key=" + this.stringMap$key + ", stringMap$value=" + this.stringMap$value + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingletonMapsBuilder builder() { - return new BuilderSingletonMapsBuilder(); - } -} diff --git a/test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java b/test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java deleted file mode 100644 index a2d230a1..00000000 --- a/test/transform/resource/after-delombok/BuilderSingletonRedirectToGuava.java +++ /dev/null @@ -1,75 +0,0 @@ -import java.util.Set; -import java.util.NavigableMap; -import java.util.Collection; -class BuilderSingletonRedirectToGuava { - private Set dangerMice; - private NavigableMap things; - private Collection> doohickeys; - @java.lang.SuppressWarnings("all") - BuilderSingletonRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { - this.dangerMice = dangerMice; - this.things = things; - this.doohickeys = doohickeys; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingletonRedirectToGuavaBuilder { - private com.google.common.collect.ImmutableSet.Builder dangerMice; - private com.google.common.collect.ImmutableSortedMap.Builder things; - private com.google.common.collect.ImmutableList.Builder> doohickeys; - @java.lang.SuppressWarnings("all") - BuilderSingletonRedirectToGuavaBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { - if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.add(dangerMouse); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { - if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.addAll(dangerMice); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuavaBuilder thing(final Integer thing$key, final Number thing$value) { - if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.put(thing$key, thing$value); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuavaBuilder things(final java.util.Map things) { - if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.putAll(things); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuavaBuilder doohickey(final Class doohickey) { - if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.add(doohickey); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { - if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.addAll(doohickeys); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonRedirectToGuava build() { - java.util.Set dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build(); - java.util.NavigableMap things = this.things == null ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build(); - java.util.Collection> doohickeys = this.doohickeys == null ? com.google.common.collect.ImmutableList.of() : this.doohickeys.build(); - return new BuilderSingletonRedirectToGuava(dangerMice, things, doohickeys); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingletonRedirectToGuava.BuilderSingletonRedirectToGuavaBuilder(dangerMice=" + this.dangerMice + ", things=" + this.things + ", doohickeys=" + this.doohickeys + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingletonRedirectToGuavaBuilder builder() { - return new BuilderSingletonRedirectToGuavaBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingletonSets.java b/test/transform/resource/after-delombok/BuilderSingletonSets.java deleted file mode 100644 index c57331a5..00000000 --- a/test/transform/resource/after-delombok/BuilderSingletonSets.java +++ /dev/null @@ -1,129 +0,0 @@ -import java.util.Set; -import java.util.SortedSet; -class BuilderSingletonSets { - private Set dangerMice; - private SortedSet octopodes; - @SuppressWarnings("all") - private Set rawSet; - private Set stringSet; - @java.lang.SuppressWarnings("all") - BuilderSingletonSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { - this.dangerMice = dangerMice; - this.octopodes = octopodes; - this.rawSet = rawSet; - this.stringSet = stringSet; - } - @java.lang.SuppressWarnings("all") - public static class BuilderSingletonSetsBuilder { - private java.util.ArrayList dangerMice; - private java.util.ArrayList octopodes; - private java.util.ArrayList rawSet; - private java.util.ArrayList stringSet; - @java.lang.SuppressWarnings("all") - BuilderSingletonSetsBuilder() { - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder dangerMouse(final T dangerMouse) { - if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); - this.dangerMice.add(dangerMouse); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder dangerMice(final java.util.Collection dangerMice) { - if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); - this.dangerMice.addAll(dangerMice); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder octopus(final Number octopus) { - if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); - this.octopodes.add(octopus); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder octopodes(final java.util.Collection octopodes) { - if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); - this.octopodes.addAll(octopodes); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder rawSet(final java.lang.Object rawSet) { - if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); - this.rawSet.add(rawSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder rawSet(final java.util.Collection rawSet) { - if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); - this.rawSet.addAll(rawSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder stringSet(final String stringSet) { - if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); - this.stringSet.add(stringSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSetsBuilder stringSet(final java.util.Collection stringSet) { - if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); - this.stringSet.addAll(stringSet); - return this; - } - @java.lang.SuppressWarnings("all") - public BuilderSingletonSets build() { - java.util.Set dangerMice; - switch (this.dangerMice == null ? 0 : this.dangerMice.size()) { - case 0: - dangerMice = java.util.Collections.emptySet(); - break; - case 1: - dangerMice = java.util.Collections.singleton(this.dangerMice.get(0)); - break; - default: - dangerMice = new java.util.LinkedHashSet(this.dangerMice.size() < 1073741824 ? 1 + this.dangerMice.size() + (this.dangerMice.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - dangerMice.addAll(this.dangerMice); - dangerMice = java.util.Collections.unmodifiableSet(dangerMice); - } - java.util.SortedSet octopodes = new java.util.TreeSet(); - if (this.octopodes != null) octopodes.addAll(this.octopodes); - octopodes = java.util.Collections.unmodifiableSortedSet(octopodes); - java.util.Set rawSet; - switch (this.rawSet == null ? 0 : this.rawSet.size()) { - case 0: - rawSet = java.util.Collections.emptySet(); - break; - case 1: - rawSet = java.util.Collections.singleton(this.rawSet.get(0)); - break; - default: - rawSet = new java.util.LinkedHashSet(this.rawSet.size() < 1073741824 ? 1 + this.rawSet.size() + (this.rawSet.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - rawSet.addAll(this.rawSet); - rawSet = java.util.Collections.unmodifiableSet(rawSet); - } - java.util.Set stringSet; - switch (this.stringSet == null ? 0 : this.stringSet.size()) { - case 0: - stringSet = java.util.Collections.emptySet(); - break; - case 1: - stringSet = java.util.Collections.singleton(this.stringSet.get(0)); - break; - default: - stringSet = new java.util.LinkedHashSet(this.stringSet.size() < 1073741824 ? 1 + this.stringSet.size() + (this.stringSet.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); - stringSet.addAll(this.stringSet); - stringSet = java.util.Collections.unmodifiableSet(stringSet); - } - return new BuilderSingletonSets(dangerMice, octopodes, rawSet, stringSet); - } - @java.lang.Override - @java.lang.SuppressWarnings("all") - public java.lang.String toString() { - return "BuilderSingletonSets.BuilderSingletonSetsBuilder(dangerMice=" + this.dangerMice + ", octopodes=" + this.octopodes + ", rawSet=" + this.rawSet + ", stringSet=" + this.stringSet + ")"; - } - } - @java.lang.SuppressWarnings("all") - public static BuilderSingletonSetsBuilder builder() { - return new BuilderSingletonSetsBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java new file mode 100644 index 00000000..3fc969ef --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java @@ -0,0 +1,93 @@ +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableCollection; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedSet; +class BuilderSingularGuavaListsSets { + private ImmutableList cards; + private ImmutableCollection frogs; + @SuppressWarnings("all") + private ImmutableSet rawSet; + private ImmutableSortedSet passes; + @java.lang.SuppressWarnings("all") + BuilderSingularGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes) { + this.cards = cards; + this.frogs = frogs; + this.rawSet = rawSet; + this.passes = passes; + } + @java.lang.SuppressWarnings("all") + public static class BuilderSingularGuavaListsSetsBuilder { + private com.google.common.collect.ImmutableList.Builder cards; + private com.google.common.collect.ImmutableList.Builder frogs; + private com.google.common.collect.ImmutableSet.Builder rawSet; + private com.google.common.collect.ImmutableSortedSet.Builder passes; + @java.lang.SuppressWarnings("all") + BuilderSingularGuavaListsSetsBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder card(final T card) { + if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); + this.cards.add(card); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { + if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); + this.cards.addAll(cards); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder frog(final Number frog) { + if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); + this.frogs.add(frog); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { + if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); + this.frogs.addAll(frogs); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { + if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); + this.rawSet.add(rawSet); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { + if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); + this.rawSet.addAll(rawSet); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder pass(final String pass) { + if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); + this.passes.add(pass); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { + if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); + this.passes.addAll(passes); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaListsSets build() { + com.google.common.collect.ImmutableList cards = this.cards == null ? com.google.common.collect.ImmutableList.of() : this.cards.build(); + com.google.common.collect.ImmutableCollection frogs = this.frogs == null ? com.google.common.collect.ImmutableList.of() : this.frogs.build(); + com.google.common.collect.ImmutableSet rawSet = this.rawSet == null ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build(); + com.google.common.collect.ImmutableSortedSet passes = this.passes == null ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build(); + return new BuilderSingularGuavaListsSets(cards, frogs, rawSet, passes); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(cards=" + this.cards + ", frogs=" + this.frogs + ", rawSet=" + this.rawSet + ", passes=" + this.passes + ")"; + } + } + @java.lang.SuppressWarnings("all") + public static BuilderSingularGuavaListsSetsBuilder builder() { + return new BuilderSingularGuavaListsSetsBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java new file mode 100644 index 00000000..c55dff28 --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java @@ -0,0 +1,76 @@ +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableBiMap; +import com.google.common.collect.ImmutableSortedMap; +class BuilderSingularGuavaMaps { + private ImmutableMap battleaxes; + private ImmutableSortedMap vertices; + @SuppressWarnings("all") + private ImmutableBiMap rawMap; + @java.lang.SuppressWarnings("all") + BuilderSingularGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { + this.battleaxes = battleaxes; + this.vertices = vertices; + this.rawMap = rawMap; + } + @java.lang.SuppressWarnings("all") + public static class BuilderSingularGuavaMapsBuilder { + private com.google.common.collect.ImmutableMap.Builder battleaxes; + private com.google.common.collect.ImmutableSortedMap.Builder vertices; + private com.google.common.collect.ImmutableBiMap.Builder rawMap; + @java.lang.SuppressWarnings("all") + BuilderSingularGuavaMapsBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMapsBuilder battleaxe(final K battleaxe$key, final V battleaxe$value) { + if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); + this.battleaxes.put(battleaxe$key, battleaxe$value); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { + if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); + this.battleaxes.putAll(battleaxes); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMapsBuilder vertex(final Integer vertex$key, final V vertex$value) { + if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.vertices.put(vertex$key, vertex$value); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMapsBuilder vertices(final java.util.Map vertices) { + if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.vertices.putAll(vertices); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMapsBuilder rawMap(final java.lang.Object rawMap$key, final java.lang.Object rawMap$value) { + if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); + this.rawMap.put(rawMap$key, rawMap$value); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMapsBuilder rawMap(final java.util.Map rawMap) { + if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); + this.rawMap.putAll(rawMap); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularGuavaMaps build() { + com.google.common.collect.ImmutableMap battleaxes = this.battleaxes == null ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build(); + com.google.common.collect.ImmutableSortedMap vertices = this.vertices == null ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build(); + com.google.common.collect.ImmutableBiMap rawMap = this.rawMap == null ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build(); + return new BuilderSingularGuavaMaps(battleaxes, vertices, rawMap); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(battleaxes=" + this.battleaxes + ", vertices=" + this.vertices + ", rawMap=" + this.rawMap + ")"; + } + } + @java.lang.SuppressWarnings("all") + public static BuilderSingularGuavaMapsBuilder builder() { + return new BuilderSingularGuavaMapsBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingularLists.java b/test/transform/resource/after-delombok/BuilderSingularLists.java new file mode 100644 index 00000000..aa5382c1 --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderSingularLists.java @@ -0,0 +1,111 @@ +import java.util.List; +import java.util.Collection; +class BuilderSingularLists { + private List children; + private Collection scarves; + @SuppressWarnings("all") + private List rawList; + @java.lang.SuppressWarnings("all") + BuilderSingularLists(final List children, final Collection scarves, final List rawList) { + this.children = children; + this.scarves = scarves; + this.rawList = rawList; + } + @java.lang.SuppressWarnings("all") + public static class BuilderSingularListsBuilder { + private java.util.ArrayList children; + private java.util.ArrayList scarves; + private java.util.ArrayList rawList; + @java.lang.SuppressWarnings("all") + BuilderSingularListsBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderSingularListsBuilder child(final T child) { + if (this.children == null) this.children = new java.util.ArrayList(); + this.children.add(child); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularListsBuilder children(final java.util.Collection children) { + if (this.children == null) this.children = new java.util.ArrayList(); + this.children.addAll(children); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularListsBuilder scarf(final Number scarf) { + if (this.scarves == null) this.scarves = new java.util.ArrayList(); + this.scarves.add(scarf); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularListsBuilder scarves(final java.util.Collection scarves) { + if (this.scarves == null) this.scarves = new java.util.ArrayList(); + this.scarves.addAll(scarves); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularListsBuilder rawList(final java.lang.Object rawList) { + if (this.rawList == null) this.rawList = new java.util.ArrayList(); + this.rawList.add(rawList); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularListsBuilder rawList(final java.util.Collection rawList) { + if (this.rawList == null) this.rawList = new java.util.ArrayList(); + this.rawList.addAll(rawList); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularLists build() { + java.util.List children; + switch (this.children == null ? 0 : this.children.size()) { + case 0: + children = java.util.Collections.emptyList(); + break; + case 1: + children = java.util.Collections.singletonList(this.children.get(0)); + break; + default: + children = new java.util.ArrayList(this.children.size()); + children.addAll(this.children); + children = java.util.Collections.unmodifiableList(children); + } + java.util.List scarves; + switch (this.scarves == null ? 0 : this.scarves.size()) { + case 0: + scarves = java.util.Collections.emptyList(); + break; + case 1: + scarves = java.util.Collections.singletonList(this.scarves.get(0)); + break; + default: + scarves = new java.util.ArrayList(this.scarves.size()); + scarves.addAll(this.scarves); + scarves = java.util.Collections.unmodifiableList(scarves); + } + java.util.List rawList; + switch (this.rawList == null ? 0 : this.rawList.size()) { + case 0: + rawList = java.util.Collections.emptyList(); + break; + case 1: + rawList = java.util.Collections.singletonList(this.rawList.get(0)); + break; + default: + rawList = new java.util.ArrayList(this.rawList.size()); + rawList.addAll(this.rawList); + rawList = java.util.Collections.unmodifiableList(rawList); + } + return new BuilderSingularLists(children, scarves, rawList); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderSingularLists.BuilderSingularListsBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")"; + } + } + @java.lang.SuppressWarnings("all") + public static BuilderSingularListsBuilder builder() { + return new BuilderSingularListsBuilder(); + } +} diff --git a/test/transform/resource/after-delombok/BuilderSingularMaps.java b/test/transform/resource/after-delombok/BuilderSingularMaps.java new file mode 100644 index 00000000..640ddb94 --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderSingularMaps.java @@ -0,0 +1,173 @@ +import java.util.Map; +import java.util.SortedMap; +class BuilderSingularMaps { + private Map women; + private SortedMap men; + @SuppressWarnings("all") + private Map rawMap; + private Map stringMap; + @java.lang.SuppressWarnings("all") + BuilderSingularMaps(final Map women, final SortedMap men, final Map rawMap, final Map stringMap) { + this.women = women; + this.men = men; + this.rawMap = rawMap; + this.stringMap = stringMap; + } + @java.lang.SuppressWarnings("all") + public static class BuilderSingularMapsBuilder { + private java.util.ArrayList women$key; + private java.util.ArrayList women$value; + private java.util.ArrayList men$key; + private java.util.ArrayList men$value; + private java.util.ArrayList rawMap$key; + private java.util.ArrayList rawMap$value; + private java.util.ArrayList stringMap$key; + private java.util.ArrayList stringMap$value; + @java.lang.SuppressWarnings("all") + BuilderSingularMapsBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder woman(final K womanKey, final V womanValue) { + if (this.women$key == null) { + this.women$key = new java.util.ArrayList(); + this.women$value = new java.util.ArrayList(); + } + this.women$key.add(womanKey); + this.women$value.add(womanValue); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder women(final java.util.Map women) { + if (this.women$key == null) { + this.women$key = new java.util.ArrayList(); + this.women$value = new java.util.ArrayList(); + } + for (final java.util.Map.Entry $lombokEntry : women.entrySet()) { + this.women$key.add($lombokEntry.getKey()); + this.women$value.add($lombokEntry.getValue()); + } + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder man(final K manKey, final Number manValue) { + if (this.men$key == null) { + this.men$key = new java.util.ArrayList(); + this.men$value = new java.util.ArrayList(); + } + this.men$key.add(manKey); + this.men$value.add(manValue); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder men(final java.util.Map men) { + if (this.men$key == null) { + this.men$key = new java.util.ArrayList(); + this.men$value = new java.util.ArrayList(); + } + for (final java.util.Map.Entry $lombokEntry : men.entrySet()) { + this.men$key.add($lombokEntry.getKey()); + this.men$value.add($lombokEntry.getValue()); + } + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder rawMap(final java.lang.Object rawMapKey, final java.lang.Object rawMapValue) { + if (this.rawMap$key == null) { + this.rawMap$key = new java.util.ArrayList(); + this.rawMap$value = new java.util.ArrayList(); + } + this.rawMap$key.add(rawMapKey); + this.rawMap$value.add(rawMapValue); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder rawMap(final java.util.Map rawMap) { + if (this.rawMap$key == null) { + this.rawMap$key = new java.util.ArrayList(); + this.rawMap$value = new java.util.ArrayList(); + } + for (final java.util.Map.Entry $lombokEntry : rawMap.entrySet()) { + this.rawMap$key.add($lombokEntry.getKey()); + this.rawMap$value.add($lombokEntry.getValue()); + } + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder stringMap(final String stringMapKey, final V stringMapValue) { + if (this.stringMap$key == null) { + this.stringMap$key = new java.util.ArrayList(); + this.stringMap$value = new java.util.ArrayList(); + } + this.stringMap$key.add(stringMapKey); + this.stringMap$value.add(stringMapValue); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMapsBuilder stringMap(final java.util.Map stringMap) { + if (this.stringMap$key == null) { + this.stringMap$key = new java.util.ArrayList(); + this.stringMap$value = new java.util.ArrayList(); + } + for (final java.util.Map.Entry $lombokEntry : stringMap.entrySet()) { + this.stringMap$key.add($lombokEntry.getKey()); + this.stringMap$value.add($lombokEntry.getValue()); + } + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularMaps build() { + java.util.Map women; + switch (this.women$key == null ? 0 : this.women$key.size()) { + case 0: + women = java.util.Collections.emptyMap(); + break; + case 1: + women = java.util.Collections.singletonMap(this.women$key.get(0), this.women$value.get(0)); + break; + default: + women = new java.util.LinkedHashMap(this.women$key.size() < 1073741824 ? 1 + this.women$key.size() + (this.women$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); + for (int $i = 0; $i < this.women$key.size(); $i++) women.put(this.women$key.get($i), this.women$value.get($i)); + women = java.util.Collections.unmodifiableMap(women); + } + java.util.SortedMap men = new java.util.TreeMap(); + if (this.men$key != null) for (int $i = 0; $i < (this.men$key == null ? 0 : this.men$key.size()); $i++) men.put(this.men$key.get($i), this.men$value.get($i)); + men = java.util.Collections.unmodifiableSortedMap(men); + java.util.Map rawMap; + switch (this.rawMap$key == null ? 0 : this.rawMap$key.size()) { + case 0: + rawMap = java.util.Collections.emptyMap(); + break; + case 1: + rawMap = java.util.Collections.singletonMap(this.rawMap$key.get(0), this.rawMap$value.get(0)); + break; + default: + rawMap = new java.util.LinkedHashMap(this.rawMap$key.size() < 1073741824 ? 1 + this.rawMap$key.size() + (this.rawMap$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); + for (int $i = 0; $i < this.rawMap$key.size(); $i++) rawMap.put(this.rawMap$key.get($i), this.rawMap$value.get($i)); + rawMap = java.util.Collections.unmodifiableMap(rawMap); + } + java.util.Map stringMap; + switch (this.stringMap$key == null ? 0 : this.stringMap$key.size()) { + case 0: + stringMap = java.util.Collections.emptyMap(); + break; + case 1: + stringMap = java.util.Collections.singletonMap(this.stringMap$key.get(0), this.stringMap$value.get(0)); + break; + default: + stringMap = new java.util.LinkedHashMap(this.stringMap$key.size() < 1073741824 ? 1 + this.stringMap$key.size() + (this.stringMap$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); + for (int $i = 0; $i < this.stringMap$key.size(); $i++) stringMap.put(this.stringMap$key.get($i), this.stringMap$value.get($i)); + stringMap = java.util.Collections.unmodifiableMap(stringMap); + } + return new BuilderSingularMaps(women, men, rawMap, stringMap); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderSingularMaps.BuilderSingularMapsBuilder(women$key=" + this.women$key + ", women$value=" + this.women$value + ", men$key=" + this.men$key + ", men$value=" + this.men$value + ", rawMap$key=" + this.rawMap$key + ", rawMap$value=" + this.rawMap$value + ", stringMap$key=" + this.stringMap$key + ", stringMap$value=" + this.stringMap$value + ")"; + } + } + @java.lang.SuppressWarnings("all") + public static BuilderSingularMapsBuilder builder() { + return new BuilderSingularMapsBuilder(); + } +} diff --git a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java new file mode 100644 index 00000000..84dc9a26 --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java @@ -0,0 +1,75 @@ +import java.util.Set; +import java.util.NavigableMap; +import java.util.Collection; +class BuilderSingularRedirectToGuava { + private Set dangerMice; + private NavigableMap things; + private Collection> doohickeys; + @java.lang.SuppressWarnings("all") + BuilderSingularRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { + this.dangerMice = dangerMice; + this.things = things; + this.doohickeys = doohickeys; + } + @java.lang.SuppressWarnings("all") + public static class BuilderSingularRedirectToGuavaBuilder { + private com.google.common.collect.ImmutableSet.Builder dangerMice; + private com.google.common.collect.ImmutableSortedMap.Builder things; + private com.google.common.collect.ImmutableList.Builder> doohickeys; + @java.lang.SuppressWarnings("all") + BuilderSingularRedirectToGuavaBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { + if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); + this.dangerMice.add(dangerMouse); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { + if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); + this.dangerMice.addAll(dangerMice); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuavaBuilder thing(final Integer thing$key, final Number thing$value) { + if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.things.put(thing$key, thing$value); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { + if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.things.putAll(things); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { + if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); + this.doohickeys.add(doohickey); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { + if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); + this.doohickeys.addAll(doohickeys); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularRedirectToGuava build() { + java.util.Set dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build(); + java.util.NavigableMap things = this.things == null ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build(); + java.util.Collection> doohickeys = this.doohickeys == null ? com.google.common.collect.ImmutableList.of() : this.doohickeys.build(); + return new BuilderSingularRedirectToGuava(dangerMice, things, doohickeys); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(dangerMice=" + this.dangerMice + ", things=" + this.things + ", doohickeys=" + this.doohickeys + ")"; + } + } + @java.lang.SuppressWarnings("all") + public static BuilderSingularRedirectToGuavaBuilder builder() { + return new BuilderSingularRedirectToGuavaBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/BuilderSingularSets.java b/test/transform/resource/after-delombok/BuilderSingularSets.java new file mode 100644 index 00000000..d75c0fbf --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderSingularSets.java @@ -0,0 +1,129 @@ +import java.util.Set; +import java.util.SortedSet; +class BuilderSingularSets { + private Set dangerMice; + private SortedSet octopodes; + @SuppressWarnings("all") + private Set rawSet; + private Set stringSet; + @java.lang.SuppressWarnings("all") + BuilderSingularSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { + this.dangerMice = dangerMice; + this.octopodes = octopodes; + this.rawSet = rawSet; + this.stringSet = stringSet; + } + @java.lang.SuppressWarnings("all") + public static class BuilderSingularSetsBuilder { + private java.util.ArrayList dangerMice; + private java.util.ArrayList octopodes; + private java.util.ArrayList rawSet; + private java.util.ArrayList stringSet; + @java.lang.SuppressWarnings("all") + BuilderSingularSetsBuilder() { + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { + if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); + this.dangerMice.add(dangerMouse); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { + if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); + this.dangerMice.addAll(dangerMice); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder octopus(final Number octopus) { + if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); + this.octopodes.add(octopus); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { + if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); + this.octopodes.addAll(octopodes); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { + if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); + this.rawSet.add(rawSet); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { + if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); + this.rawSet.addAll(rawSet); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder stringSet(final String stringSet) { + if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); + this.stringSet.add(stringSet); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { + if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); + this.stringSet.addAll(stringSet); + return this; + } + @java.lang.SuppressWarnings("all") + public BuilderSingularSets build() { + java.util.Set dangerMice; + switch (this.dangerMice == null ? 0 : this.dangerMice.size()) { + case 0: + dangerMice = java.util.Collections.emptySet(); + break; + case 1: + dangerMice = java.util.Collections.singleton(this.dangerMice.get(0)); + break; + default: + dangerMice = new java.util.LinkedHashSet(this.dangerMice.size() < 1073741824 ? 1 + this.dangerMice.size() + (this.dangerMice.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); + dangerMice.addAll(this.dangerMice); + dangerMice = java.util.Collections.unmodifiableSet(dangerMice); + } + java.util.SortedSet octopodes = new java.util.TreeSet(); + if (this.octopodes != null) octopodes.addAll(this.octopodes); + octopodes = java.util.Collections.unmodifiableSortedSet(octopodes); + java.util.Set rawSet; + switch (this.rawSet == null ? 0 : this.rawSet.size()) { + case 0: + rawSet = java.util.Collections.emptySet(); + break; + case 1: + rawSet = java.util.Collections.singleton(this.rawSet.get(0)); + break; + default: + rawSet = new java.util.LinkedHashSet(this.rawSet.size() < 1073741824 ? 1 + this.rawSet.size() + (this.rawSet.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); + rawSet.addAll(this.rawSet); + rawSet = java.util.Collections.unmodifiableSet(rawSet); + } + java.util.Set stringSet; + switch (this.stringSet == null ? 0 : this.stringSet.size()) { + case 0: + stringSet = java.util.Collections.emptySet(); + break; + case 1: + stringSet = java.util.Collections.singleton(this.stringSet.get(0)); + break; + default: + stringSet = new java.util.LinkedHashSet(this.stringSet.size() < 1073741824 ? 1 + this.stringSet.size() + (this.stringSet.size() - 3) / 3 : java.lang.Integer.MAX_VALUE); + stringSet.addAll(this.stringSet); + stringSet = java.util.Collections.unmodifiableSet(stringSet); + } + return new BuilderSingularSets(dangerMice, octopodes, rawSet, stringSet); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderSingularSets.BuilderSingularSetsBuilder(dangerMice=" + this.dangerMice + ", octopodes=" + this.octopodes + ", rawSet=" + this.rawSet + ", stringSet=" + this.stringSet + ")"; + } + } + @java.lang.SuppressWarnings("all") + public static BuilderSingularSetsBuilder builder() { + return new BuilderSingularSetsBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java b/test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java deleted file mode 100644 index d14cb049..00000000 --- a/test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java +++ /dev/null @@ -1,88 +0,0 @@ -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableCollection; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; -import lombok.Singular; -@lombok.Builder class BuilderSingletonGuavaListsSets { - public static @java.lang.SuppressWarnings("all") class BuilderSingletonGuavaListsSetsBuilder { - private com.google.common.collect.ImmutableList.Builder cards; - private com.google.common.collect.ImmutableList.Builder frogs; - private com.google.common.collect.ImmutableSet.Builder rawSet; - private com.google.common.collect.ImmutableSortedSet.Builder passes; - @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder card(T card) { - if ((this.cards == null)) - this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.add(card); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder cards(java.lang.Iterable cards) { - if ((this.cards == null)) - this.cards = com.google.common.collect.ImmutableList.builder(); - this.cards.addAll(cards); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder frog(Number frog) { - if ((this.frogs == null)) - this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.add(frog); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder frogs(java.lang.Iterable frogs) { - if ((this.frogs == null)) - this.frogs = com.google.common.collect.ImmutableList.builder(); - this.frogs.addAll(frogs); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder rawSet(java.lang.Object rawSet) { - if ((this.rawSet == null)) - this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.add(rawSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder rawSet(java.lang.Iterable rawSet) { - if ((this.rawSet == null)) - this.rawSet = com.google.common.collect.ImmutableSet.builder(); - this.rawSet.addAll(rawSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder pass(String pass) { - if ((this.passes == null)) - this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.add(pass); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder passes(java.lang.Iterable passes) { - if ((this.passes == null)) - this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); - this.passes.addAll(passes); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSets build() { - com.google.common.collect.ImmutableList cards = ((this.cards == null) ? com.google.common.collect.ImmutableList.of() : this.cards.build()); - com.google.common.collect.ImmutableCollection frogs = ((this.frogs == null) ? com.google.common.collect.ImmutableList.of() : this.frogs.build()); - com.google.common.collect.ImmutableSet rawSet = ((this.rawSet == null) ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build()); - com.google.common.collect.ImmutableSortedSet passes = ((this.passes == null) ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build()); - return new BuilderSingletonGuavaListsSets(cards, frogs, rawSet, passes); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((("BuilderSingletonGuavaListsSets.BuilderSingletonGuavaListsSetsBuilder(cards=" + this.cards) + ", frogs=") + this.frogs) + ", rawSet=") + this.rawSet) + ", passes=") + this.passes) + ")"); - } - } - private @Singular ImmutableList cards; - private @Singular ImmutableCollection frogs; - private @SuppressWarnings("all") @Singular("rawSet") ImmutableSet rawSet; - private @Singular ImmutableSortedSet passes; - @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes) { - super(); - this.cards = cards; - this.frogs = frogs; - this.rawSet = rawSet; - this.passes = passes; - } - public static @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder builder() { - return new BuilderSingletonGuavaListsSetsBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java b/test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java deleted file mode 100644 index 33788df9..00000000 --- a/test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java +++ /dev/null @@ -1,71 +0,0 @@ -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableSortedMap; -import lombok.Singular; -@lombok.Builder class BuilderSingletonGuavaMaps { - public static @java.lang.SuppressWarnings("all") class BuilderSingletonGuavaMapsBuilder { - private com.google.common.collect.ImmutableMap.Builder battleaxes; - private com.google.common.collect.ImmutableSortedMap.Builder vertices; - private com.google.common.collect.ImmutableBiMap.Builder rawMap; - @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder battleaxe(K battleaxe$key, V battleaxe$value) { - if ((this.battleaxes == null)) - this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.put(battleaxe$key, battleaxe$value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder battleaxes(java.util.Map battleaxes) { - if ((this.battleaxes == null)) - this.battleaxes = com.google.common.collect.ImmutableMap.builder(); - this.battleaxes.putAll(battleaxes); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder vertex(Integer vertex$key, V vertex$value) { - if ((this.vertices == null)) - this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.put(vertex$key, vertex$value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder vertices(java.util.Map vertices) { - if ((this.vertices == null)) - this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.vertices.putAll(vertices); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder rawMap(java.lang.Object rawMap$key, java.lang.Object rawMap$value) { - if ((this.rawMap == null)) - this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.put(rawMap$key, rawMap$value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder rawMap(java.util.Map rawMap) { - if ((this.rawMap == null)) - this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); - this.rawMap.putAll(rawMap); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMaps build() { - com.google.common.collect.ImmutableMap battleaxes = ((this.battleaxes == null) ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build()); - com.google.common.collect.ImmutableSortedMap vertices = ((this.vertices == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build()); - com.google.common.collect.ImmutableBiMap rawMap = ((this.rawMap == null) ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build()); - return new BuilderSingletonGuavaMaps(battleaxes, vertices, rawMap); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("BuilderSingletonGuavaMaps.BuilderSingletonGuavaMapsBuilder(battleaxes=" + this.battleaxes) + ", vertices=") + this.vertices) + ", rawMap=") + this.rawMap) + ")"); - } - } - private @Singular ImmutableMap battleaxes; - private @Singular ImmutableSortedMap vertices; - private @SuppressWarnings("all") @Singular("rawMap") ImmutableBiMap rawMap; - @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { - super(); - this.battleaxes = battleaxes; - this.vertices = vertices; - this.rawMap = rawMap; - } - public static @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder builder() { - return new BuilderSingletonGuavaMapsBuilder(); - } -} diff --git a/test/transform/resource/after-ecj/BuilderSingletonLists.java b/test/transform/resource/after-ecj/BuilderSingletonLists.java deleted file mode 100644 index 05f6e6e9..00000000 --- a/test/transform/resource/after-ecj/BuilderSingletonLists.java +++ /dev/null @@ -1,107 +0,0 @@ -import java.util.List; -import java.util.Collection; - -import lombok.Singular; -@lombok.Builder class BuilderSingletonLists { - public static @java.lang.SuppressWarnings("all") class BuilderSingletonListsBuilder { - private java.util.ArrayList children; - private java.util.ArrayList scarves; - private java.util.ArrayList rawList; - @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder child(T child) { - if ((this.children == null)) - this.children = new java.util.ArrayList(); - this.children.add(child); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder children(java.util.Collection children) { - if ((this.children == null)) - this.children = new java.util.ArrayList(); - this.children.addAll(children); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder scarf(Number scarf) { - if ((this.scarves == null)) - this.scarves = new java.util.ArrayList(); - this.scarves.add(scarf); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder scarves(java.util.Collection scarves) { - if ((this.scarves == null)) - this.scarves = new java.util.ArrayList(); - this.scarves.addAll(scarves); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder rawList(java.lang.Object rawList) { - if ((this.rawList == null)) - this.rawList = new java.util.ArrayList(); - this.rawList.add(rawList); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder rawList(java.util.Collection rawList) { - if ((this.rawList == null)) - this.rawList = new java.util.ArrayList(); - this.rawList.addAll(rawList); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonLists build() { - java.util.List children; - switch (((this.children == null) ? 0 : this.children.size())) { - case 0 : - children = java.util.Collections.emptyList(); - break; - case 1 : - children = java.util.Collections.singletonList(this.children.get(0)); - break; - default : - children = new java.util.ArrayList(this.children.size()); - children.addAll(this.children); - children = java.util.Collections.unmodifiableList(children); - } - java.util.List scarves; - switch (((this.scarves == null) ? 0 : this.scarves.size())) { - case 0 : - scarves = java.util.Collections.emptyList(); - break; - case 1 : - scarves = java.util.Collections.singletonList(this.scarves.get(0)); - break; - default : - scarves = new java.util.ArrayList(this.scarves.size()); - scarves.addAll(this.scarves); - scarves = java.util.Collections.unmodifiableList(scarves); - } - java.util.List rawList; - switch (((this.rawList == null) ? 0 : this.rawList.size())) { - case 0 : - rawList = java.util.Collections.emptyList(); - break; - case 1 : - rawList = java.util.Collections.singletonList(this.rawList.get(0)); - break; - default : - rawList = new java.util.ArrayList(this.rawList.size()); - rawList.addAll(this.rawList); - rawList = java.util.Collections.unmodifiableList(rawList); - } - return new BuilderSingletonLists(children, scarves, rawList); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("BuilderSingletonLists.BuilderSingletonListsBuilder(children=" + this.children) + ", scarves=") + this.scarves) + ", rawList=") + this.rawList) + ")"); - } - } - private @Singular List children; - private @Singular Collection scarves; - private @SuppressWarnings("all") @Singular("rawList") List rawList; - @java.lang.SuppressWarnings("all") BuilderSingletonLists(final List children, final Collection scarves, final List rawList) { - super(); - this.children = children; - this.scarves = scarves; - this.rawList = rawList; - } - public static @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder builder() { - return new BuilderSingletonListsBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingletonMaps.java b/test/transform/resource/after-ecj/BuilderSingletonMaps.java deleted file mode 100644 index ccd57193..00000000 --- a/test/transform/resource/after-ecj/BuilderSingletonMaps.java +++ /dev/null @@ -1,177 +0,0 @@ -import java.util.Map; -import java.util.SortedMap; -import lombok.Singular; -@lombok.Builder class BuilderSingletonMaps { - public static @java.lang.SuppressWarnings("all") class BuilderSingletonMapsBuilder { - private java.util.ArrayList women$key; - private java.util.ArrayList women$value; - private java.util.ArrayList men$key; - private java.util.ArrayList men$value; - private java.util.ArrayList rawMap$key; - private java.util.ArrayList rawMap$value; - private java.util.ArrayList stringMap$key; - private java.util.ArrayList stringMap$value; - @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder woman(K womanKey, V womanValue) { - if ((this.women$key == null)) - { - this.women$key = new java.util.ArrayList(); - this.women$value = new java.util.ArrayList(); - } - this.women$key.add(womanKey); - this.women$value.add(womanValue); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder women(java.util.Map women) { - if ((this.women$key == null)) - { - this.women$key = new java.util.ArrayList(); - this.women$value = new java.util.ArrayList(); - } - for (java.util.Map.Entry $lombokEntry : women.entrySet()) - { - this.women$key.add($lombokEntry.getKey()); - this.women$value.add($lombokEntry.getValue()); - } - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder man(K manKey, Number manValue) { - if ((this.men$key == null)) - { - this.men$key = new java.util.ArrayList(); - this.men$value = new java.util.ArrayList(); - } - this.men$key.add(manKey); - this.men$value.add(manValue); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder men(java.util.Map men) { - if ((this.men$key == null)) - { - this.men$key = new java.util.ArrayList(); - this.men$value = new java.util.ArrayList(); - } - for (java.util.Map.Entry $lombokEntry : men.entrySet()) - { - this.men$key.add($lombokEntry.getKey()); - this.men$value.add($lombokEntry.getValue()); - } - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder rawMap(java.lang.Object rawMapKey, java.lang.Object rawMapValue) { - if ((this.rawMap$key == null)) - { - this.rawMap$key = new java.util.ArrayList(); - this.rawMap$value = new java.util.ArrayList(); - } - this.rawMap$key.add(rawMapKey); - this.rawMap$value.add(rawMapValue); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder rawMap(java.util.Map rawMap) { - if ((this.rawMap$key == null)) - { - this.rawMap$key = new java.util.ArrayList(); - this.rawMap$value = new java.util.ArrayList(); - } - for (java.util.Map.Entry $lombokEntry : rawMap.entrySet()) - { - this.rawMap$key.add($lombokEntry.getKey()); - this.rawMap$value.add($lombokEntry.getValue()); - } - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder stringMap(String stringMapKey, V stringMapValue) { - if ((this.stringMap$key == null)) - { - this.stringMap$key = new java.util.ArrayList(); - this.stringMap$value = new java.util.ArrayList(); - } - this.stringMap$key.add(stringMapKey); - this.stringMap$value.add(stringMapValue); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder stringMap(java.util.Map stringMap) { - if ((this.stringMap$key == null)) - { - this.stringMap$key = new java.util.ArrayList(); - this.stringMap$value = new java.util.ArrayList(); - } - for (java.util.Map.Entry $lombokEntry : stringMap.entrySet()) - { - this.stringMap$key.add($lombokEntry.getKey()); - this.stringMap$value.add($lombokEntry.getValue()); - } - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonMaps build() { - java.util.Map women; - switch (((this.women$key == null) ? 0 : this.women$key.size())) { - case 0 : - women = java.util.Collections.emptyMap(); - break; - case 1 : - women = java.util.Collections.singletonMap(this.women$key.get(0), this.women$value.get(0)); - break; - default : - women = new java.util.LinkedHashMap(((this.women$key.size() < 0x40000000) ? ((1 + this.women$key.size()) + ((this.women$key.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); - for (int $i = 0;; ($i < this.women$key.size()); $i ++) - women.put(this.women$key.get($i), this.women$value.get($i)); - women = java.util.Collections.unmodifiableMap(women); - } - java.util.SortedMap men = new java.util.TreeMap(); - if ((this.men$key != null)) - for (int $i = 0;; ($i < ((this.men$key == null) ? 0 : this.men$key.size())); $i ++) - men.put(this.men$key.get($i), this.men$value.get($i)); - men = java.util.Collections.unmodifiableSortedMap(men); - java.util.Map rawMap; - switch (((this.rawMap$key == null) ? 0 : this.rawMap$key.size())) { - case 0 : - rawMap = java.util.Collections.emptyMap(); - break; - case 1 : - rawMap = java.util.Collections.singletonMap(this.rawMap$key.get(0), this.rawMap$value.get(0)); - break; - default : - rawMap = new java.util.LinkedHashMap(((this.rawMap$key.size() < 0x40000000) ? ((1 + this.rawMap$key.size()) + ((this.rawMap$key.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); - for (int $i = 0;; ($i < this.rawMap$key.size()); $i ++) - rawMap.put(this.rawMap$key.get($i), this.rawMap$value.get($i)); - rawMap = java.util.Collections.unmodifiableMap(rawMap); - } - java.util.Map stringMap; - switch (((this.stringMap$key == null) ? 0 : this.stringMap$key.size())) { - case 0 : - stringMap = java.util.Collections.emptyMap(); - break; - case 1 : - stringMap = java.util.Collections.singletonMap(this.stringMap$key.get(0), this.stringMap$value.get(0)); - break; - default : - stringMap = new java.util.LinkedHashMap(((this.stringMap$key.size() < 0x40000000) ? ((1 + this.stringMap$key.size()) + ((this.stringMap$key.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); - for (int $i = 0;; ($i < this.stringMap$key.size()); $i ++) - stringMap.put(this.stringMap$key.get($i), this.stringMap$value.get($i)); - stringMap = java.util.Collections.unmodifiableMap(stringMap); - } - return new BuilderSingletonMaps(women, men, rawMap, stringMap); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((((((((((("BuilderSingletonMaps.BuilderSingletonMapsBuilder(women$key=" + this.women$key) + ", women$value=") + this.women$value) + ", men$key=") + this.men$key) + ", men$value=") + this.men$value) + ", rawMap$key=") + this.rawMap$key) + ", rawMap$value=") + this.rawMap$value) + ", stringMap$key=") + this.stringMap$key) + ", stringMap$value=") + this.stringMap$value) + ")"); - } - } - private @Singular Map women; - private @Singular SortedMap men; - private @SuppressWarnings("all") @Singular("rawMap") Map rawMap; - private @Singular("stringMap") Map stringMap; - @java.lang.SuppressWarnings("all") BuilderSingletonMaps(final Map women, final SortedMap men, final Map rawMap, final Map stringMap) { - super(); - this.women = women; - this.men = men; - this.rawMap = rawMap; - this.stringMap = stringMap; - } - public static @java.lang.SuppressWarnings("all") BuilderSingletonMapsBuilder builder() { - return new BuilderSingletonMapsBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java b/test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java deleted file mode 100644 index ce8fab10..00000000 --- a/test/transform/resource/after-ecj/BuilderSingletonRedirectToGuava.java +++ /dev/null @@ -1,71 +0,0 @@ -import java.util.Set; -import java.util.NavigableMap; -import java.util.Collection; -import lombok.Singular; -@lombok.Builder class BuilderSingletonRedirectToGuava { - public static @java.lang.SuppressWarnings("all") class BuilderSingletonRedirectToGuavaBuilder { - private com.google.common.collect.ImmutableSet.Builder dangerMice; - private com.google.common.collect.ImmutableSortedMap.Builder things; - private com.google.common.collect.ImmutableList.Builder> doohickeys; - @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder dangerMouse(String dangerMouse) { - if ((this.dangerMice == null)) - this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.add(dangerMouse); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder dangerMice(java.lang.Iterable dangerMice) { - if ((this.dangerMice == null)) - this.dangerMice = com.google.common.collect.ImmutableSet.builder(); - this.dangerMice.addAll(dangerMice); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder thing(Integer thing$key, Number thing$value) { - if ((this.things == null)) - this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.put(thing$key, thing$value); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder things(java.util.Map things) { - if ((this.things == null)) - this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); - this.things.putAll(things); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder doohickey(Class doohickey) { - if ((this.doohickeys == null)) - this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.add(doohickey); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder doohickeys(java.lang.Iterable> doohickeys) { - if ((this.doohickeys == null)) - this.doohickeys = com.google.common.collect.ImmutableList.builder(); - this.doohickeys.addAll(doohickeys); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuava build() { - java.util.Set dangerMice = ((this.dangerMice == null) ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build()); - java.util.NavigableMap things = ((this.things == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build()); - java.util.Collection> doohickeys = ((this.doohickeys == null) ? com.google.common.collect.ImmutableList.of() : this.doohickeys.build()); - return new BuilderSingletonRedirectToGuava(dangerMice, things, doohickeys); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("BuilderSingletonRedirectToGuava.BuilderSingletonRedirectToGuavaBuilder(dangerMice=" + this.dangerMice) + ", things=") + this.things) + ", doohickeys=") + this.doohickeys) + ")"); - } - } - private @Singular Set dangerMice; - private @Singular NavigableMap things; - private @Singular Collection> doohickeys; - @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { - super(); - this.dangerMice = dangerMice; - this.things = things; - this.doohickeys = doohickeys; - } - public static @java.lang.SuppressWarnings("all") BuilderSingletonRedirectToGuavaBuilder builder() { - return new BuilderSingletonRedirectToGuavaBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingletonSets.java b/test/transform/resource/after-ecj/BuilderSingletonSets.java deleted file mode 100644 index 7b6f6425..00000000 --- a/test/transform/resource/after-ecj/BuilderSingletonSets.java +++ /dev/null @@ -1,125 +0,0 @@ -import java.util.Set; -import java.util.SortedSet; -import lombok.Singular; -@lombok.Builder class BuilderSingletonSets { - public static @java.lang.SuppressWarnings("all") class BuilderSingletonSetsBuilder { - private java.util.ArrayList dangerMice; - private java.util.ArrayList octopodes; - private java.util.ArrayList rawSet; - private java.util.ArrayList stringSet; - @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder() { - super(); - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder dangerMouse(T dangerMouse) { - if ((this.dangerMice == null)) - this.dangerMice = new java.util.ArrayList(); - this.dangerMice.add(dangerMouse); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder dangerMice(java.util.Collection dangerMice) { - if ((this.dangerMice == null)) - this.dangerMice = new java.util.ArrayList(); - this.dangerMice.addAll(dangerMice); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder octopus(Number octopus) { - if ((this.octopodes == null)) - this.octopodes = new java.util.ArrayList(); - this.octopodes.add(octopus); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder octopodes(java.util.Collection octopodes) { - if ((this.octopodes == null)) - this.octopodes = new java.util.ArrayList(); - this.octopodes.addAll(octopodes); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder rawSet(java.lang.Object rawSet) { - if ((this.rawSet == null)) - this.rawSet = new java.util.ArrayList(); - this.rawSet.add(rawSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder rawSet(java.util.Collection rawSet) { - if ((this.rawSet == null)) - this.rawSet = new java.util.ArrayList(); - this.rawSet.addAll(rawSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder stringSet(String stringSet) { - if ((this.stringSet == null)) - this.stringSet = new java.util.ArrayList(); - this.stringSet.add(stringSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder stringSet(java.util.Collection stringSet) { - if ((this.stringSet == null)) - this.stringSet = new java.util.ArrayList(); - this.stringSet.addAll(stringSet); - return this; - } - public @java.lang.SuppressWarnings("all") BuilderSingletonSets build() { - java.util.Set dangerMice; - switch (((this.dangerMice == null) ? 0 : this.dangerMice.size())) { - case 0 : - dangerMice = java.util.Collections.emptySet(); - break; - case 1 : - dangerMice = java.util.Collections.singleton(this.dangerMice.get(0)); - break; - default : - dangerMice = new java.util.LinkedHashSet(((this.dangerMice.size() < 0x40000000) ? ((1 + this.dangerMice.size()) + ((this.dangerMice.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); - dangerMice.addAll(this.dangerMice); - dangerMice = java.util.Collections.unmodifiableSet(dangerMice); - } - java.util.SortedSet octopodes = new java.util.TreeSet(); - if ((this.octopodes != null)) - octopodes.addAll(this.octopodes); - octopodes = java.util.Collections.unmodifiableSortedSet(octopodes); - java.util.Set rawSet; - switch (((this.rawSet == null) ? 0 : this.rawSet.size())) { - case 0 : - rawSet = java.util.Collections.emptySet(); - break; - case 1 : - rawSet = java.util.Collections.singleton(this.rawSet.get(0)); - break; - default : - rawSet = new java.util.LinkedHashSet(((this.rawSet.size() < 0x40000000) ? ((1 + this.rawSet.size()) + ((this.rawSet.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); - rawSet.addAll(this.rawSet); - rawSet = java.util.Collections.unmodifiableSet(rawSet); - } - java.util.Set stringSet; - switch (((this.stringSet == null) ? 0 : this.stringSet.size())) { - case 0 : - stringSet = java.util.Collections.emptySet(); - break; - case 1 : - stringSet = java.util.Collections.singleton(this.stringSet.get(0)); - break; - default : - stringSet = new java.util.LinkedHashSet(((this.stringSet.size() < 0x40000000) ? ((1 + this.stringSet.size()) + ((this.stringSet.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); - stringSet.addAll(this.stringSet); - stringSet = java.util.Collections.unmodifiableSet(stringSet); - } - return new BuilderSingletonSets(dangerMice, octopodes, rawSet, stringSet); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((((("BuilderSingletonSets.BuilderSingletonSetsBuilder(dangerMice=" + this.dangerMice) + ", octopodes=") + this.octopodes) + ", rawSet=") + this.rawSet) + ", stringSet=") + this.stringSet) + ")"); - } - } - private @Singular Set dangerMice; - private @Singular SortedSet octopodes; - private @SuppressWarnings("all") @Singular("rawSet") Set rawSet; - private @Singular("stringSet") Set stringSet; - @java.lang.SuppressWarnings("all") BuilderSingletonSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { - super(); - this.dangerMice = dangerMice; - this.octopodes = octopodes; - this.rawSet = rawSet; - this.stringSet = stringSet; - } - public static @java.lang.SuppressWarnings("all") BuilderSingletonSetsBuilder builder() { - return new BuilderSingletonSetsBuilder(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java new file mode 100644 index 00000000..f95ce1ea --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java @@ -0,0 +1,88 @@ +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableCollection; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedSet; +import lombok.Singular; +@lombok.Builder class BuilderSingularGuavaListsSets { + public static @java.lang.SuppressWarnings("all") class BuilderSingularGuavaListsSetsBuilder { + private com.google.common.collect.ImmutableList.Builder cards; + private com.google.common.collect.ImmutableList.Builder frogs; + private com.google.common.collect.ImmutableSet.Builder rawSet; + private com.google.common.collect.ImmutableSortedSet.Builder passes; + @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder card(T card) { + if ((this.cards == null)) + this.cards = com.google.common.collect.ImmutableList.builder(); + this.cards.add(card); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder cards(java.lang.Iterable cards) { + if ((this.cards == null)) + this.cards = com.google.common.collect.ImmutableList.builder(); + this.cards.addAll(cards); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder frog(Number frog) { + if ((this.frogs == null)) + this.frogs = com.google.common.collect.ImmutableList.builder(); + this.frogs.add(frog); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder frogs(java.lang.Iterable frogs) { + if ((this.frogs == null)) + this.frogs = com.google.common.collect.ImmutableList.builder(); + this.frogs.addAll(frogs); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder rawSet(java.lang.Object rawSet) { + if ((this.rawSet == null)) + this.rawSet = com.google.common.collect.ImmutableSet.builder(); + this.rawSet.add(rawSet); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder rawSet(java.lang.Iterable rawSet) { + if ((this.rawSet == null)) + this.rawSet = com.google.common.collect.ImmutableSet.builder(); + this.rawSet.addAll(rawSet); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder pass(String pass) { + if ((this.passes == null)) + this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); + this.passes.add(pass); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder passes(java.lang.Iterable passes) { + if ((this.passes == null)) + this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); + this.passes.addAll(passes); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets build() { + com.google.common.collect.ImmutableList cards = ((this.cards == null) ? com.google.common.collect.ImmutableList.of() : this.cards.build()); + com.google.common.collect.ImmutableCollection frogs = ((this.frogs == null) ? com.google.common.collect.ImmutableList.of() : this.frogs.build()); + com.google.common.collect.ImmutableSet rawSet = ((this.rawSet == null) ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build()); + com.google.common.collect.ImmutableSortedSet passes = ((this.passes == null) ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build()); + return new BuilderSingularGuavaListsSets(cards, frogs, rawSet, passes); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((((("BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(cards=" + this.cards) + ", frogs=") + this.frogs) + ", rawSet=") + this.rawSet) + ", passes=") + this.passes) + ")"); + } + } + private @Singular ImmutableList cards; + private @Singular ImmutableCollection frogs; + private @SuppressWarnings("all") @Singular("rawSet") ImmutableSet rawSet; + private @Singular ImmutableSortedSet passes; + @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes) { + super(); + this.cards = cards; + this.frogs = frogs; + this.rawSet = rawSet; + this.passes = passes; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSetsBuilder builder() { + return new BuilderSingularGuavaListsSetsBuilder(); + } +} diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java new file mode 100644 index 00000000..64f287bf --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java @@ -0,0 +1,71 @@ +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableBiMap; +import com.google.common.collect.ImmutableSortedMap; +import lombok.Singular; +@lombok.Builder class BuilderSingularGuavaMaps { + public static @java.lang.SuppressWarnings("all") class BuilderSingularGuavaMapsBuilder { + private com.google.common.collect.ImmutableMap.Builder battleaxes; + private com.google.common.collect.ImmutableSortedMap.Builder vertices; + private com.google.common.collect.ImmutableBiMap.Builder rawMap; + @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder battleaxe(K battleaxe$key, V battleaxe$value) { + if ((this.battleaxes == null)) + this.battleaxes = com.google.common.collect.ImmutableMap.builder(); + this.battleaxes.put(battleaxe$key, battleaxe$value); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder battleaxes(java.util.Map battleaxes) { + if ((this.battleaxes == null)) + this.battleaxes = com.google.common.collect.ImmutableMap.builder(); + this.battleaxes.putAll(battleaxes); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder vertex(Integer vertex$key, V vertex$value) { + if ((this.vertices == null)) + this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.vertices.put(vertex$key, vertex$value); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder vertices(java.util.Map vertices) { + if ((this.vertices == null)) + this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.vertices.putAll(vertices); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder rawMap(java.lang.Object rawMap$key, java.lang.Object rawMap$value) { + if ((this.rawMap == null)) + this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); + this.rawMap.put(rawMap$key, rawMap$value); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder rawMap(java.util.Map rawMap) { + if ((this.rawMap == null)) + this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); + this.rawMap.putAll(rawMap); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps build() { + com.google.common.collect.ImmutableMap battleaxes = ((this.battleaxes == null) ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build()); + com.google.common.collect.ImmutableSortedMap vertices = ((this.vertices == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build()); + com.google.common.collect.ImmutableBiMap rawMap = ((this.rawMap == null) ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build()); + return new BuilderSingularGuavaMaps(battleaxes, vertices, rawMap); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((("BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(battleaxes=" + this.battleaxes) + ", vertices=") + this.vertices) + ", rawMap=") + this.rawMap) + ")"); + } + } + private @Singular ImmutableMap battleaxes; + private @Singular ImmutableSortedMap vertices; + private @SuppressWarnings("all") @Singular("rawMap") ImmutableBiMap rawMap; + @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { + super(); + this.battleaxes = battleaxes; + this.vertices = vertices; + this.rawMap = rawMap; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularGuavaMapsBuilder builder() { + return new BuilderSingularGuavaMapsBuilder(); + } +} diff --git a/test/transform/resource/after-ecj/BuilderSingularLists.java b/test/transform/resource/after-ecj/BuilderSingularLists.java new file mode 100644 index 00000000..c0a3ef9a --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularLists.java @@ -0,0 +1,107 @@ +import java.util.List; +import java.util.Collection; + +import lombok.Singular; +@lombok.Builder class BuilderSingularLists { + public static @java.lang.SuppressWarnings("all") class BuilderSingularListsBuilder { + private java.util.ArrayList children; + private java.util.ArrayList scarves; + private java.util.ArrayList rawList; + @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder child(T child) { + if ((this.children == null)) + this.children = new java.util.ArrayList(); + this.children.add(child); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder children(java.util.Collection children) { + if ((this.children == null)) + this.children = new java.util.ArrayList(); + this.children.addAll(children); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder scarf(Number scarf) { + if ((this.scarves == null)) + this.scarves = new java.util.ArrayList(); + this.scarves.add(scarf); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder scarves(java.util.Collection scarves) { + if ((this.scarves == null)) + this.scarves = new java.util.ArrayList(); + this.scarves.addAll(scarves); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder rawList(java.lang.Object rawList) { + if ((this.rawList == null)) + this.rawList = new java.util.ArrayList(); + this.rawList.add(rawList); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder rawList(java.util.Collection rawList) { + if ((this.rawList == null)) + this.rawList = new java.util.ArrayList(); + this.rawList.addAll(rawList); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularLists build() { + java.util.List children; + switch (((this.children == null) ? 0 : this.children.size())) { + case 0 : + children = java.util.Collections.emptyList(); + break; + case 1 : + children = java.util.Collections.singletonList(this.children.get(0)); + break; + default : + children = new java.util.ArrayList(this.children.size()); + children.addAll(this.children); + children = java.util.Collections.unmodifiableList(children); + } + java.util.List scarves; + switch (((this.scarves == null) ? 0 : this.scarves.size())) { + case 0 : + scarves = java.util.Collections.emptyList(); + break; + case 1 : + scarves = java.util.Collections.singletonList(this.scarves.get(0)); + break; + default : + scarves = new java.util.ArrayList(this.scarves.size()); + scarves.addAll(this.scarves); + scarves = java.util.Collections.unmodifiableList(scarves); + } + java.util.List rawList; + switch (((this.rawList == null) ? 0 : this.rawList.size())) { + case 0 : + rawList = java.util.Collections.emptyList(); + break; + case 1 : + rawList = java.util.Collections.singletonList(this.rawList.get(0)); + break; + default : + rawList = new java.util.ArrayList(this.rawList.size()); + rawList.addAll(this.rawList); + rawList = java.util.Collections.unmodifiableList(rawList); + } + return new BuilderSingularLists(children, scarves, rawList); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((("BuilderSingularLists.BuilderSingularListsBuilder(children=" + this.children) + ", scarves=") + this.scarves) + ", rawList=") + this.rawList) + ")"); + } + } + private @Singular List children; + private @Singular Collection scarves; + private @SuppressWarnings("all") @Singular("rawList") List rawList; + @java.lang.SuppressWarnings("all") BuilderSingularLists(final List children, final Collection scarves, final List rawList) { + super(); + this.children = children; + this.scarves = scarves; + this.rawList = rawList; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularListsBuilder builder() { + return new BuilderSingularListsBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularMaps.java b/test/transform/resource/after-ecj/BuilderSingularMaps.java new file mode 100644 index 00000000..0ce5a0a9 --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularMaps.java @@ -0,0 +1,177 @@ +import java.util.Map; +import java.util.SortedMap; +import lombok.Singular; +@lombok.Builder class BuilderSingularMaps { + public static @java.lang.SuppressWarnings("all") class BuilderSingularMapsBuilder { + private java.util.ArrayList women$key; + private java.util.ArrayList women$value; + private java.util.ArrayList men$key; + private java.util.ArrayList men$value; + private java.util.ArrayList rawMap$key; + private java.util.ArrayList rawMap$value; + private java.util.ArrayList stringMap$key; + private java.util.ArrayList stringMap$value; + @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder woman(K womanKey, V womanValue) { + if ((this.women$key == null)) + { + this.women$key = new java.util.ArrayList(); + this.women$value = new java.util.ArrayList(); + } + this.women$key.add(womanKey); + this.women$value.add(womanValue); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder women(java.util.Map women) { + if ((this.women$key == null)) + { + this.women$key = new java.util.ArrayList(); + this.women$value = new java.util.ArrayList(); + } + for (java.util.Map.Entry $lombokEntry : women.entrySet()) + { + this.women$key.add($lombokEntry.getKey()); + this.women$value.add($lombokEntry.getValue()); + } + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder man(K manKey, Number manValue) { + if ((this.men$key == null)) + { + this.men$key = new java.util.ArrayList(); + this.men$value = new java.util.ArrayList(); + } + this.men$key.add(manKey); + this.men$value.add(manValue); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder men(java.util.Map men) { + if ((this.men$key == null)) + { + this.men$key = new java.util.ArrayList(); + this.men$value = new java.util.ArrayList(); + } + for (java.util.Map.Entry $lombokEntry : men.entrySet()) + { + this.men$key.add($lombokEntry.getKey()); + this.men$value.add($lombokEntry.getValue()); + } + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder rawMap(java.lang.Object rawMapKey, java.lang.Object rawMapValue) { + if ((this.rawMap$key == null)) + { + this.rawMap$key = new java.util.ArrayList(); + this.rawMap$value = new java.util.ArrayList(); + } + this.rawMap$key.add(rawMapKey); + this.rawMap$value.add(rawMapValue); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder rawMap(java.util.Map rawMap) { + if ((this.rawMap$key == null)) + { + this.rawMap$key = new java.util.ArrayList(); + this.rawMap$value = new java.util.ArrayList(); + } + for (java.util.Map.Entry $lombokEntry : rawMap.entrySet()) + { + this.rawMap$key.add($lombokEntry.getKey()); + this.rawMap$value.add($lombokEntry.getValue()); + } + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder stringMap(String stringMapKey, V stringMapValue) { + if ((this.stringMap$key == null)) + { + this.stringMap$key = new java.util.ArrayList(); + this.stringMap$value = new java.util.ArrayList(); + } + this.stringMap$key.add(stringMapKey); + this.stringMap$value.add(stringMapValue); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder stringMap(java.util.Map stringMap) { + if ((this.stringMap$key == null)) + { + this.stringMap$key = new java.util.ArrayList(); + this.stringMap$value = new java.util.ArrayList(); + } + for (java.util.Map.Entry $lombokEntry : stringMap.entrySet()) + { + this.stringMap$key.add($lombokEntry.getKey()); + this.stringMap$value.add($lombokEntry.getValue()); + } + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularMaps build() { + java.util.Map women; + switch (((this.women$key == null) ? 0 : this.women$key.size())) { + case 0 : + women = java.util.Collections.emptyMap(); + break; + case 1 : + women = java.util.Collections.singletonMap(this.women$key.get(0), this.women$value.get(0)); + break; + default : + women = new java.util.LinkedHashMap(((this.women$key.size() < 0x40000000) ? ((1 + this.women$key.size()) + ((this.women$key.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); + for (int $i = 0;; ($i < this.women$key.size()); $i ++) + women.put(this.women$key.get($i), this.women$value.get($i)); + women = java.util.Collections.unmodifiableMap(women); + } + java.util.SortedMap men = new java.util.TreeMap(); + if ((this.men$key != null)) + for (int $i = 0;; ($i < ((this.men$key == null) ? 0 : this.men$key.size())); $i ++) + men.put(this.men$key.get($i), this.men$value.get($i)); + men = java.util.Collections.unmodifiableSortedMap(men); + java.util.Map rawMap; + switch (((this.rawMap$key == null) ? 0 : this.rawMap$key.size())) { + case 0 : + rawMap = java.util.Collections.emptyMap(); + break; + case 1 : + rawMap = java.util.Collections.singletonMap(this.rawMap$key.get(0), this.rawMap$value.get(0)); + break; + default : + rawMap = new java.util.LinkedHashMap(((this.rawMap$key.size() < 0x40000000) ? ((1 + this.rawMap$key.size()) + ((this.rawMap$key.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); + for (int $i = 0;; ($i < this.rawMap$key.size()); $i ++) + rawMap.put(this.rawMap$key.get($i), this.rawMap$value.get($i)); + rawMap = java.util.Collections.unmodifiableMap(rawMap); + } + java.util.Map stringMap; + switch (((this.stringMap$key == null) ? 0 : this.stringMap$key.size())) { + case 0 : + stringMap = java.util.Collections.emptyMap(); + break; + case 1 : + stringMap = java.util.Collections.singletonMap(this.stringMap$key.get(0), this.stringMap$value.get(0)); + break; + default : + stringMap = new java.util.LinkedHashMap(((this.stringMap$key.size() < 0x40000000) ? ((1 + this.stringMap$key.size()) + ((this.stringMap$key.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); + for (int $i = 0;; ($i < this.stringMap$key.size()); $i ++) + stringMap.put(this.stringMap$key.get($i), this.stringMap$value.get($i)); + stringMap = java.util.Collections.unmodifiableMap(stringMap); + } + return new BuilderSingularMaps(women, men, rawMap, stringMap); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((((((((((((("BuilderSingularMaps.BuilderSingularMapsBuilder(women$key=" + this.women$key) + ", women$value=") + this.women$value) + ", men$key=") + this.men$key) + ", men$value=") + this.men$value) + ", rawMap$key=") + this.rawMap$key) + ", rawMap$value=") + this.rawMap$value) + ", stringMap$key=") + this.stringMap$key) + ", stringMap$value=") + this.stringMap$value) + ")"); + } + } + private @Singular Map women; + private @Singular SortedMap men; + private @SuppressWarnings("all") @Singular("rawMap") Map rawMap; + private @Singular("stringMap") Map stringMap; + @java.lang.SuppressWarnings("all") BuilderSingularMaps(final Map women, final SortedMap men, final Map rawMap, final Map stringMap) { + super(); + this.women = women; + this.men = men; + this.rawMap = rawMap; + this.stringMap = stringMap; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularMapsBuilder builder() { + return new BuilderSingularMapsBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java new file mode 100644 index 00000000..eeff550b --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java @@ -0,0 +1,71 @@ +import java.util.Set; +import java.util.NavigableMap; +import java.util.Collection; +import lombok.Singular; +@lombok.Builder class BuilderSingularRedirectToGuava { + public static @java.lang.SuppressWarnings("all") class BuilderSingularRedirectToGuavaBuilder { + private com.google.common.collect.ImmutableSet.Builder dangerMice; + private com.google.common.collect.ImmutableSortedMap.Builder things; + private com.google.common.collect.ImmutableList.Builder> doohickeys; + @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder dangerMouse(String dangerMouse) { + if ((this.dangerMice == null)) + this.dangerMice = com.google.common.collect.ImmutableSet.builder(); + this.dangerMice.add(dangerMouse); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder dangerMice(java.lang.Iterable dangerMice) { + if ((this.dangerMice == null)) + this.dangerMice = com.google.common.collect.ImmutableSet.builder(); + this.dangerMice.addAll(dangerMice); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder thing(Integer thing$key, Number thing$value) { + if ((this.things == null)) + this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.things.put(thing$key, thing$value); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder things(java.util.Map things) { + if ((this.things == null)) + this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); + this.things.putAll(things); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder doohickey(Class doohickey) { + if ((this.doohickeys == null)) + this.doohickeys = com.google.common.collect.ImmutableList.builder(); + this.doohickeys.add(doohickey); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder doohickeys(java.lang.Iterable> doohickeys) { + if ((this.doohickeys == null)) + this.doohickeys = com.google.common.collect.ImmutableList.builder(); + this.doohickeys.addAll(doohickeys); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava build() { + java.util.Set dangerMice = ((this.dangerMice == null) ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build()); + java.util.NavigableMap things = ((this.things == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build()); + java.util.Collection> doohickeys = ((this.doohickeys == null) ? com.google.common.collect.ImmutableList.of() : this.doohickeys.build()); + return new BuilderSingularRedirectToGuava(dangerMice, things, doohickeys); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((("BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(dangerMice=" + this.dangerMice) + ", things=") + this.things) + ", doohickeys=") + this.doohickeys) + ")"); + } + } + private @Singular Set dangerMice; + private @Singular NavigableMap things; + private @Singular Collection> doohickeys; + @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { + super(); + this.dangerMice = dangerMice; + this.things = things; + this.doohickeys = doohickeys; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuavaBuilder builder() { + return new BuilderSingularRedirectToGuavaBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularSets.java b/test/transform/resource/after-ecj/BuilderSingularSets.java new file mode 100644 index 00000000..5d2fcc59 --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderSingularSets.java @@ -0,0 +1,125 @@ +import java.util.Set; +import java.util.SortedSet; +import lombok.Singular; +@lombok.Builder class BuilderSingularSets { + public static @java.lang.SuppressWarnings("all") class BuilderSingularSetsBuilder { + private java.util.ArrayList dangerMice; + private java.util.ArrayList octopodes; + private java.util.ArrayList rawSet; + private java.util.ArrayList stringSet; + @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder dangerMouse(T dangerMouse) { + if ((this.dangerMice == null)) + this.dangerMice = new java.util.ArrayList(); + this.dangerMice.add(dangerMouse); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder dangerMice(java.util.Collection dangerMice) { + if ((this.dangerMice == null)) + this.dangerMice = new java.util.ArrayList(); + this.dangerMice.addAll(dangerMice); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder octopus(Number octopus) { + if ((this.octopodes == null)) + this.octopodes = new java.util.ArrayList(); + this.octopodes.add(octopus); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder octopodes(java.util.Collection octopodes) { + if ((this.octopodes == null)) + this.octopodes = new java.util.ArrayList(); + this.octopodes.addAll(octopodes); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder rawSet(java.lang.Object rawSet) { + if ((this.rawSet == null)) + this.rawSet = new java.util.ArrayList(); + this.rawSet.add(rawSet); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder rawSet(java.util.Collection rawSet) { + if ((this.rawSet == null)) + this.rawSet = new java.util.ArrayList(); + this.rawSet.addAll(rawSet); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder stringSet(String stringSet) { + if ((this.stringSet == null)) + this.stringSet = new java.util.ArrayList(); + this.stringSet.add(stringSet); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder stringSet(java.util.Collection stringSet) { + if ((this.stringSet == null)) + this.stringSet = new java.util.ArrayList(); + this.stringSet.addAll(stringSet); + return this; + } + public @java.lang.SuppressWarnings("all") BuilderSingularSets build() { + java.util.Set dangerMice; + switch (((this.dangerMice == null) ? 0 : this.dangerMice.size())) { + case 0 : + dangerMice = java.util.Collections.emptySet(); + break; + case 1 : + dangerMice = java.util.Collections.singleton(this.dangerMice.get(0)); + break; + default : + dangerMice = new java.util.LinkedHashSet(((this.dangerMice.size() < 0x40000000) ? ((1 + this.dangerMice.size()) + ((this.dangerMice.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); + dangerMice.addAll(this.dangerMice); + dangerMice = java.util.Collections.unmodifiableSet(dangerMice); + } + java.util.SortedSet octopodes = new java.util.TreeSet(); + if ((this.octopodes != null)) + octopodes.addAll(this.octopodes); + octopodes = java.util.Collections.unmodifiableSortedSet(octopodes); + java.util.Set rawSet; + switch (((this.rawSet == null) ? 0 : this.rawSet.size())) { + case 0 : + rawSet = java.util.Collections.emptySet(); + break; + case 1 : + rawSet = java.util.Collections.singleton(this.rawSet.get(0)); + break; + default : + rawSet = new java.util.LinkedHashSet(((this.rawSet.size() < 0x40000000) ? ((1 + this.rawSet.size()) + ((this.rawSet.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); + rawSet.addAll(this.rawSet); + rawSet = java.util.Collections.unmodifiableSet(rawSet); + } + java.util.Set stringSet; + switch (((this.stringSet == null) ? 0 : this.stringSet.size())) { + case 0 : + stringSet = java.util.Collections.emptySet(); + break; + case 1 : + stringSet = java.util.Collections.singleton(this.stringSet.get(0)); + break; + default : + stringSet = new java.util.LinkedHashSet(((this.stringSet.size() < 0x40000000) ? ((1 + this.stringSet.size()) + ((this.stringSet.size() - 3) / 3)) : java.lang.Integer.MAX_VALUE)); + stringSet.addAll(this.stringSet); + stringSet = java.util.Collections.unmodifiableSet(stringSet); + } + return new BuilderSingularSets(dangerMice, octopodes, rawSet, stringSet); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((((("BuilderSingularSets.BuilderSingularSetsBuilder(dangerMice=" + this.dangerMice) + ", octopodes=") + this.octopodes) + ", rawSet=") + this.rawSet) + ", stringSet=") + this.stringSet) + ")"); + } + } + private @Singular Set dangerMice; + private @Singular SortedSet octopodes; + private @SuppressWarnings("all") @Singular("rawSet") Set rawSet; + private @Singular("stringSet") Set stringSet; + @java.lang.SuppressWarnings("all") BuilderSingularSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { + super(); + this.dangerMice = dangerMice; + this.octopodes = octopodes; + this.rawSet = rawSet; + this.stringSet = stringSet; + } + public static @java.lang.SuppressWarnings("all") BuilderSingularSetsBuilder builder() { + return new BuilderSingularSetsBuilder(); + } +} \ No newline at end of file diff --git a/test/transform/resource/before/BuilderSingletonGuavaListsSets.java b/test/transform/resource/before/BuilderSingletonGuavaListsSets.java deleted file mode 100644 index e94d84b6..00000000 --- a/test/transform/resource/before/BuilderSingletonGuavaListsSets.java +++ /dev/null @@ -1,14 +0,0 @@ -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableCollection; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedSet; - -import lombok.Singular; - -@lombok.Builder -class BuilderSingletonGuavaListsSets { - @Singular private ImmutableList cards; - @Singular private ImmutableCollection frogs; - @SuppressWarnings("all") @Singular("rawSet") private ImmutableSet rawSet; - @Singular private ImmutableSortedSet passes; -} diff --git a/test/transform/resource/before/BuilderSingletonGuavaMaps.java b/test/transform/resource/before/BuilderSingletonGuavaMaps.java deleted file mode 100644 index 1ff00c5b..00000000 --- a/test/transform/resource/before/BuilderSingletonGuavaMaps.java +++ /dev/null @@ -1,12 +0,0 @@ -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableBiMap; -import com.google.common.collect.ImmutableSortedMap; - -import lombok.Singular; - -@lombok.Builder -class BuilderSingletonGuavaMaps { - @Singular private ImmutableMap battleaxes; - @Singular private ImmutableSortedMap vertices; - @SuppressWarnings("all") @Singular("rawMap") private ImmutableBiMap rawMap; -} diff --git a/test/transform/resource/before/BuilderSingletonLists.java b/test/transform/resource/before/BuilderSingletonLists.java deleted file mode 100644 index ed57a5a8..00000000 --- a/test/transform/resource/before/BuilderSingletonLists.java +++ /dev/null @@ -1,11 +0,0 @@ -import java.util.List; -import java.util.Collection; - -import lombok.Singular; - -@lombok.Builder -class BuilderSingletonLists { - @Singular private List children; - @Singular private Collection scarves; - @SuppressWarnings("all") @Singular("rawList") private List rawList; -} diff --git a/test/transform/resource/before/BuilderSingletonMaps.java b/test/transform/resource/before/BuilderSingletonMaps.java deleted file mode 100644 index 92750c0a..00000000 --- a/test/transform/resource/before/BuilderSingletonMaps.java +++ /dev/null @@ -1,12 +0,0 @@ -import java.util.Map; -import java.util.SortedMap; - -import lombok.Singular; - -@lombok.Builder -class BuilderSingletonMaps { - @Singular private Map women; - @Singular private SortedMap men; - @SuppressWarnings("all") @Singular("rawMap") private Map rawMap; - @Singular("stringMap") private Map stringMap; -} diff --git a/test/transform/resource/before/BuilderSingletonRedirectToGuava.java b/test/transform/resource/before/BuilderSingletonRedirectToGuava.java deleted file mode 100644 index 0429f0ed..00000000 --- a/test/transform/resource/before/BuilderSingletonRedirectToGuava.java +++ /dev/null @@ -1,13 +0,0 @@ -//CONF: lombok.builder.useGuava = true -import java.util.Set; -import java.util.NavigableMap; -import java.util.Collection; - -import lombok.Singular; - -@lombok.Builder -class BuilderSingletonRedirectToGuava { - @Singular private Set dangerMice; - @Singular private NavigableMap things; - @Singular private Collection> doohickeys; -} diff --git a/test/transform/resource/before/BuilderSingletonSets.java b/test/transform/resource/before/BuilderSingletonSets.java deleted file mode 100644 index 42cac0dc..00000000 --- a/test/transform/resource/before/BuilderSingletonSets.java +++ /dev/null @@ -1,12 +0,0 @@ -import java.util.Set; -import java.util.SortedSet; - -import lombok.Singular; - -@lombok.Builder -class BuilderSingletonSets { - @Singular private Set dangerMice; - @Singular private SortedSet octopodes; - @SuppressWarnings("all") @Singular("rawSet") private Set rawSet; - @Singular("stringSet") private Set stringSet; -} diff --git a/test/transform/resource/before/BuilderSingularGuavaListsSets.java b/test/transform/resource/before/BuilderSingularGuavaListsSets.java new file mode 100644 index 00000000..995c00e8 --- /dev/null +++ b/test/transform/resource/before/BuilderSingularGuavaListsSets.java @@ -0,0 +1,14 @@ +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableCollection; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedSet; + +import lombok.Singular; + +@lombok.Builder +class BuilderSingularGuavaListsSets { + @Singular private ImmutableList cards; + @Singular private ImmutableCollection frogs; + @SuppressWarnings("all") @Singular("rawSet") private ImmutableSet rawSet; + @Singular private ImmutableSortedSet passes; +} diff --git a/test/transform/resource/before/BuilderSingularGuavaMaps.java b/test/transform/resource/before/BuilderSingularGuavaMaps.java new file mode 100644 index 00000000..64a53570 --- /dev/null +++ b/test/transform/resource/before/BuilderSingularGuavaMaps.java @@ -0,0 +1,12 @@ +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableBiMap; +import com.google.common.collect.ImmutableSortedMap; + +import lombok.Singular; + +@lombok.Builder +class BuilderSingularGuavaMaps { + @Singular private ImmutableMap battleaxes; + @Singular private ImmutableSortedMap vertices; + @SuppressWarnings("all") @Singular("rawMap") private ImmutableBiMap rawMap; +} diff --git a/test/transform/resource/before/BuilderSingularLists.java b/test/transform/resource/before/BuilderSingularLists.java new file mode 100644 index 00000000..93fced8e --- /dev/null +++ b/test/transform/resource/before/BuilderSingularLists.java @@ -0,0 +1,11 @@ +import java.util.List; +import java.util.Collection; + +import lombok.Singular; + +@lombok.Builder +class BuilderSingularLists { + @Singular private List children; + @Singular private Collection scarves; + @SuppressWarnings("all") @Singular("rawList") private List rawList; +} diff --git a/test/transform/resource/before/BuilderSingularMaps.java b/test/transform/resource/before/BuilderSingularMaps.java new file mode 100644 index 00000000..e17f74fc --- /dev/null +++ b/test/transform/resource/before/BuilderSingularMaps.java @@ -0,0 +1,12 @@ +import java.util.Map; +import java.util.SortedMap; + +import lombok.Singular; + +@lombok.Builder +class BuilderSingularMaps { + @Singular private Map women; + @Singular private SortedMap men; + @SuppressWarnings("all") @Singular("rawMap") private Map rawMap; + @Singular("stringMap") private Map stringMap; +} diff --git a/test/transform/resource/before/BuilderSingularRedirectToGuava.java b/test/transform/resource/before/BuilderSingularRedirectToGuava.java new file mode 100644 index 00000000..7e1e2c23 --- /dev/null +++ b/test/transform/resource/before/BuilderSingularRedirectToGuava.java @@ -0,0 +1,13 @@ +//CONF: lombok.builder.useGuava = true +import java.util.Set; +import java.util.NavigableMap; +import java.util.Collection; + +import lombok.Singular; + +@lombok.Builder +class BuilderSingularRedirectToGuava { + @Singular private Set dangerMice; + @Singular private NavigableMap things; + @Singular private Collection> doohickeys; +} diff --git a/test/transform/resource/before/BuilderSingularSets.java b/test/transform/resource/before/BuilderSingularSets.java new file mode 100644 index 00000000..68c4510a --- /dev/null +++ b/test/transform/resource/before/BuilderSingularSets.java @@ -0,0 +1,12 @@ +import java.util.Set; +import java.util.SortedSet; + +import lombok.Singular; + +@lombok.Builder +class BuilderSingularSets { + @Singular private Set dangerMice; + @Singular private SortedSet octopodes; + @SuppressWarnings("all") @Singular("rawSet") private Set rawSet; + @Singular("stringSet") private Set stringSet; +} -- cgit