aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java (renamed from test/transform/resource/after-delombok/BuilderWithPrefix.java)0
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java124
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java140
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularListsWithSetterPrefix.java123
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java213
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java121
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularRedirectToGuavaWithSetterPrefix.java93
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularSetsWithPrefix.java153
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java65
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java97
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java56
-rw-r--r--test/transform/resource/after-delombok/BuilderTypeAnnosWithSetterPrefix.java45
-rw-r--r--test/transform/resource/after-delombok/BuilderValueDataWithSetterPrefix.java109
-rw-r--r--test/transform/resource/after-delombok/BuilderWithAccessorsWithSetterPrefix.java60
-rw-r--r--test/transform/resource/after-delombok/BuilderWithBadNamesWithSetterPrefix.java42
-rw-r--r--test/transform/resource/after-delombok/BuilderWithDeprecatedWithSetterPrefix.java114
-rw-r--r--test/transform/resource/after-delombok/BuilderWithExistingBuilderClassWithSetterPrefix.java40
-rw-r--r--test/transform/resource/after-delombok/BuilderWithNoBuilderMethodWithSetterPrefix.java33
-rw-r--r--test/transform/resource/after-delombok/BuilderWithNonNullWithSetterPrefix.java40
-rw-r--r--test/transform/resource/after-delombok/BuilderWithRecursiveGenericsWithSetterPrefix.java85
-rw-r--r--test/transform/resource/after-delombok/BuilderWithToBuilderWithSetterPrefix.java146
-rw-r--r--test/transform/resource/after-delombok/BuilderWithTolerateWithSetterPrefix.java40
-rw-r--r--test/transform/resource/after-ecj/BuilderSimpleWithSetterPrefix.java (renamed from test/transform/resource/after-ecj/BuilderWithPrefix.java)0
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java121
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularGuavaListsSetsWithSetterPrefix.java125
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularGuavaMapsWithSetterPrefix.java83
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularListsWithSetterPrefix.java116
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java209
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java114
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularRedirectToGuavaWithSetterPrefix.java83
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java145
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java60
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java92
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java51
-rw-r--r--test/transform/resource/after-ecj/BuilderTypeAnnosWithSetterPrefix.java33
-rw-r--r--test/transform/resource/after-ecj/BuilderValueDataWithSetterPrefix.java90
-rw-r--r--test/transform/resource/after-ecj/BuilderWithAccessorsWithSetterPrefix.java47
-rw-r--r--test/transform/resource/after-ecj/BuilderWithBadNamesWithSetterPrefix.java33
-rw-r--r--test/transform/resource/after-ecj/BuilderWithDeprecatedWithSetterPrefix.java87
-rw-r--r--test/transform/resource/after-ecj/BuilderWithExistingBuilderClassWithSetterPrefix.java36
-rw-r--r--test/transform/resource/after-ecj/BuilderWithNoBuilderMethodWithSetterPrefix.java27
-rw-r--r--test/transform/resource/after-ecj/BuilderWithNonNullWithSetterPrefix.java34
-rw-r--r--test/transform/resource/after-ecj/BuilderWithRecursiveGenericsWithSetterPrefix.java78
-rw-r--r--test/transform/resource/after-ecj/BuilderWithToBuilderWithSetterPrefix.java123
-rw-r--r--test/transform/resource/after-ecj/BuilderWithTolerateWithSetterPrefix.java34
-rw-r--r--test/transform/resource/before/BuilderSimpleWithSetterPrefix.java (renamed from test/transform/resource/before/BuilderWithPrefix.java)0
-rw-r--r--test/transform/resource/before/BuilderSingularAnnotatedTypesWithSetterPrefix.java14
-rw-r--r--test/transform/resource/before/BuilderSingularGuavaListsSetsWithSetterPrefix.java16
-rw-r--r--test/transform/resource/before/BuilderSingularGuavaMapsWithPrefix.java12
-rw-r--r--test/transform/resource/before/BuilderSingularListsWithSetterPrefix.java11
-rw-r--r--test/transform/resource/before/BuilderSingularMapsWithSetterPrefix.java15
-rw-r--r--test/transform/resource/before/BuilderSingularNoAutoWithSetterPrefix.java11
-rw-r--r--test/transform/resource/before/BuilderSingularRedirectToGuavaWithSetterPrefix.java13
-rw-r--r--test/transform/resource/before/BuilderSingularSetsWithSetterPrefix.java12
-rw-r--r--test/transform/resource/before/BuilderSingularToBuilderWithNullWithSetterPrefix.java10
-rw-r--r--test/transform/resource/before/BuilderSingularWildcardListsWithToBuilderWithSetterPrefix.java10
-rw-r--r--test/transform/resource/before/BuilderSingularWithPrefixesWithSetterPrefix.java7
-rw-r--r--test/transform/resource/before/BuilderTypeAnnosWithSetterPrefix.java14
-rw-r--r--test/transform/resource/before/BuilderValueDataWithSetterPrefix.java11
-rw-r--r--test/transform/resource/before/BuilderWithAccessorsWithSetterPrefix.java7
-rw-r--r--test/transform/resource/before/BuilderWithBadNamesWithSetterPrefix.java5
-rw-r--r--test/transform/resource/before/BuilderWithDeprecatedWithSetterPrefix.java11
-rw-r--r--test/transform/resource/before/BuilderWithExistingBuilderClassWithSetterPrefix.java15
-rw-r--r--test/transform/resource/before/BuilderWithNoBuilderMethodWithSetterPrefix.java5
-rw-r--r--test/transform/resource/before/BuilderWithNonNullWithSetterPrefix.java5
-rw-r--r--test/transform/resource/before/BuilderWithRecursiveGenericsWithSetterPrefix.java13
-rw-r--r--test/transform/resource/before/BuilderWithToBuilderWithSetterPrefix.java20
-rw-r--r--test/transform/resource/before/BuilderWithTolerateWithSetterPrefix.java18
68 files changed, 4015 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithPrefix.java b/test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java
index c29d2a16..c29d2a16 100644
--- a/test/transform/resource/after-delombok/BuilderWithPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSimpleWithSetterPrefix.java
diff --git a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java
new file mode 100644
index 00000000..2d535e65
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java
@@ -0,0 +1,124 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.Set;
+import java.util.Map;
+import lombok.NonNull;
+@Target(ElementType.TYPE_USE)
+@interface MyAnnotation {
+}
+class BuilderSingularAnnotatedTypes {
+ private Set<@MyAnnotation @NonNull String> foos;
+ private Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingularAnnotatedTypes(final Set<@MyAnnotation @NonNull String> foos, final Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars) {
+ this.foos = foos;
+ this.bars = bars;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderSingularAnnotatedTypesBuilder {
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<@MyAnnotation @NonNull String> foos;
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<@MyAnnotation @NonNull String> bars$key;
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<@MyAnnotation @NonNull Integer> bars$value;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingularAnnotatedTypesBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypesBuilder withFoo(@MyAnnotation @NonNull final String foo) {
+ if (foo == null) {
+ throw new java.lang.NullPointerException("foo is marked non-null but is null");
+ }
+ if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
+ this.foos.add(foo);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypesBuilder withFoos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
+ if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
+ this.foos.addAll(foos);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypesBuilder clearFoos() {
+ if (this.foos != null) this.foos.clear();
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypesBuilder withBar(@MyAnnotation @NonNull final String barKey, @MyAnnotation @NonNull final Integer barValue) {
+ if (barKey == null) {
+ throw new java.lang.NullPointerException("barKey is marked non-null but is null");
+ }
+ if (barValue == null) {
+ throw new java.lang.NullPointerException("barValue is marked non-null but is null");
+ }
+ if (this.bars$key == null) {
+ this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
+ this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>();
+ }
+ this.bars$key.add(barKey);
+ this.bars$value.add(barValue);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypesBuilder withBars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
+ if (this.bars$key == null) {
+ this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
+ this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>();
+ }
+ for (final java.util.Map.Entry<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> $lombokEntry : bars.entrySet()) {
+ this.bars$key.add($lombokEntry.getKey());
+ this.bars$value.add($lombokEntry.getValue());
+ }
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypesBuilder clearBars() {
+ if (this.bars$key != null) {
+ this.bars$key.clear();
+ this.bars$value.clear();
+ }
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularAnnotatedTypes build() {
+ java.util.Set<@MyAnnotation @NonNull String> foos;
+ switch (this.foos == null ? 0 : this.foos.size()) {
+ case 0:
+ foos = java.util.Collections.emptySet();
+ break;
+ case 1:
+ foos = java.util.Collections.singleton(this.foos.get(0));
+ break;
+ default:
+ foos = new java.util.LinkedHashSet<@MyAnnotation @NonNull String>(this.foos.size() < 1073741824 ? 1 + this.foos.size() + (this.foos.size() - 3) / 3 : java.lang.Integer.MAX_VALUE);
+ foos.addAll(this.foos);
+ foos = java.util.Collections.unmodifiableSet(foos);
+ }
+ java.util.Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars;
+ switch (this.bars$key == null ? 0 : this.bars$key.size()) {
+ case 0:
+ bars = java.util.Collections.emptyMap();
+ break;
+ case 1:
+ bars = java.util.Collections.singletonMap(this.bars$key.get(0), this.bars$value.get(0));
+ break;
+ default:
+ bars = new java.util.LinkedHashMap<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer>(this.bars$key.size() < 1073741824 ? 1 + this.bars$key.size() + (this.bars$key.size() - 3) / 3 : java.lang.Integer.MAX_VALUE);
+ for (int $i = 0; $i < this.bars$key.size(); $i++) bars.put(this.bars$key.get($i), (@MyAnnotation @NonNull Integer) this.bars$value.get($i));
+ bars = java.util.Collections.unmodifiableMap(bars);
+ }
+ return new BuilderSingularAnnotatedTypes(foos, bars);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder(foos=" + this.foos + ", bars$key=" + this.bars$key + ", bars$value=" + this.bars$value + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static BuilderSingularAnnotatedTypesBuilder builder() {
+ return new BuilderSingularAnnotatedTypesBuilder();
+ }
+}
diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java
new file mode 100644
index 00000000..0e9e6dfd
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSetsWithSetterPrefix.java
@@ -0,0 +1,140 @@
+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 com.google.common.collect.ImmutableTable;
+class BuilderSingularGuavaListsSets<T> {
+ private ImmutableList<T> cards;
+ private ImmutableCollection<? extends Number> frogs;
+ @SuppressWarnings("all")
+ private ImmutableSet rawSet;
+ private ImmutableSortedSet<String> passes;
+ private ImmutableTable<? extends Number, ? extends Number, String> users;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingularGuavaListsSets(final ImmutableList<T> cards, final ImmutableCollection<? extends Number> frogs, final ImmutableSet rawSet, final ImmutableSortedSet<String> passes, final ImmutableTable<? extends Number, ? extends Number, String> users) {
+ this.cards = cards;
+ this.frogs = frogs;
+ this.rawSet = rawSet;
+ this.passes = passes;
+ this.users = users;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderSingularGuavaListsSetsBuilder<T> {
+ @java.lang.SuppressWarnings("all")
+ private com.google.common.collect.ImmutableList.Builder<T> cards;
+ @java.lang.SuppressWarnings("all")
+ private com.google.common.collect.ImmutableList.Builder<Number> frogs;
+ @java.lang.SuppressWarnings("all")
+ private com.google.common.collect.ImmutableSet.Builder<java.lang.Object> rawSet;
+ @java.lang.SuppressWarnings("all")
+ private com.google.common.collect.ImmutableSortedSet.Builder<String> passes;
+ @java.lang.SuppressWarnings("all")
+ private com.google.common.collect.ImmutableTable.Builder<Number, Number, String> users;
+ @java.lang.SuppressWarnings("all")
+ BuilderSingularGuavaListsSetsBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> withCard(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<T> withCards(final java.lang.Iterable<? extends T> 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<T> clearCards() {
+ this.cards = null;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> withFrog(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<T> withFrogs(final java.lang.Iterable<? extends Number> 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<T> clearFrogs() {
+ this.frogs = null;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> withRawSet(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<T> withRawSet(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<T> clearRawSet() {
+ this.rawSet = null;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> withPass(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<T> withPasses(final java.lang.Iterable<? extends String> passes) {
+ if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder();
+ this.passes.addAll(passes);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> clearPasses() {
+ this.passes = null;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> withUser(final Number rowKey, final Number columnKey, final String value) {
+ if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder();
+ this.users.put(rowKey, columnKey, value);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> withUsers(final com.google.common.collect.Table<? extends Number, ? extends Number, ? extends String> users) {
+ if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder();
+ this.users.putAll(users);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSetsBuilder<T> clearUsers() {
+ this.users = null;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderSingularGuavaListsSets<T> build() {
+ com.google.common.collect.ImmutableList<T> cards = this.cards == null ? com.google.common.collect.ImmutableList.<T>of() : this.cards.build();
+ com.google.common.collect.ImmutableCollection<Number> frogs = this.frogs == null ? com.google.common.collect.ImmutableList.<Number>of() : this.frogs.build();
+ com.google.common.collect.ImmutableSet<java.lang.Object> rawSet = this.rawSet == null ? com.google.common.collect.ImmutableSet.<java.lang.Object>of() : this.rawSet.build();
+ com.google.common.collect.ImmutableSortedSet<String> passes = this.passes == null ? com.google.common.collect.ImmutableSortedSet.<String>of() : this.passes.build();
+ com.google.common.collect.ImmutableTable<Number, Number, String> users = this.users == null ? com.google.common.collect.ImmutableTable.<Number, Number, String>of() : this.users.build();
+ return new BuilderSingularGuavaListsSets<T>(cards, frogs, rawSet, passes, users);