aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-01-19 23:39:40 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-01-19 23:39:40 +0100
commit519f95c2410c2e43c60e81233cad105552975606 (patch)
treebfbcdd60de47e19e5a0e510060099c0277cf7175 /test/transform
parentd6fe0a281b23f44afd241fc60f5401bbca6fa0a8 (diff)
downloadlombok-519f95c2410c2e43c60e81233cad105552975606.tar.gz
lombok-519f95c2410c2e43c60e81233cad105552975606.tar.bz2
lombok-519f95c2410c2e43c60e81233cad105552975606.zip
builder @Singleton now works fully in eclipse as well! feature done!
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java1
-rw-r--r--test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java1
-rw-r--r--test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java88
-rw-r--r--test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java71
-rw-r--r--test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java2
-rw-r--r--test/transform/resource/before/BuilderSingletonGuavaListsSets.java2
-rw-r--r--test/transform/resource/before/BuilderSingletonGuavaMaps.java2
-rw-r--r--test/transform/resource/before/BuilderWithExistingBuilderClass.java2
-rw-r--r--test/transform/resource/messages-ecj/BuilderComplex.java.messages1
9 files changed, 166 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java b/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java
index d6b44b12..4503f2bb 100644
--- a/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java
+++ b/test/transform/resource/after-delombok/BuilderSingletonGuavaListsSets.java
@@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableSortedSet;
class BuilderSingletonGuavaListsSets<T> {
private ImmutableList<T> cards;
private ImmutableCollection<? extends Number> frogs;
+ @SuppressWarnings("all")
private ImmutableSet rawSet;
private ImmutableSortedSet<String> passes;
@java.lang.SuppressWarnings("all")
diff --git a/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java b/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java
index 14525ece..ff39da32 100644
--- a/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java
+++ b/test/transform/resource/after-delombok/BuilderSingletonGuavaMaps.java
@@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableSortedMap;
class BuilderSingletonGuavaMaps<K, V> {
private ImmutableMap<K, V> battleaxes;
private ImmutableSortedMap<Integer, ? extends V> vertices;
+ @SuppressWarnings("all")
private ImmutableBiMap rawMap;
@java.lang.SuppressWarnings("all")
BuilderSingletonGuavaMaps(final ImmutableMap<K, V> battleaxes, final ImmutableSortedMap<Integer, ? extends V> vertices, final ImmutableBiMap rawMap) {
diff --git a/test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java b/test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.java
new file mode 100644
index 00000000..d14cb049
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderSingletonGuavaListsSets.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 BuilderSingletonGuavaListsSets<T> {
+ public static @java.lang.SuppressWarnings("all") class BuilderSingletonGuavaListsSetsBuilder<T> {
+ private com.google.common.collect.ImmutableList.Builder<T> cards;
+ private com.google.common.collect.ImmutableList.Builder<Number> frogs;
+ private com.google.common.collect.ImmutableSet.Builder<java.lang.Object> rawSet;
+ private com.google.common.collect.ImmutableSortedSet.Builder<String> passes;
+ @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSetsBuilder<T> 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<T> cards(java.lang.Iterable<? extends T> 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<T> 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<T> frogs(java.lang.Iterable<? extends Number> 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<T> 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<T> 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<T> 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<T> passes(java.lang.Iterable<? extends String> 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<T> build() {
+ com.google.common.collect.ImmutableList<T> cards = ((this.cards == null) ? com.google.common.collect.ImmutableList.of() : this.cards.build());
+ com.google.common.collect.ImmutableCollection<Number> frogs = ((this.frogs == null) ? com.google.common.collect.ImmutableList.of() : this.frogs.build());
+ com.google.common.collect.ImmutableSet<java.lang.Object> rawSet = ((this.rawSet == null) ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build());
+ com.google.common.collect.ImmutableSortedSet<String> passes = ((this.passes == null) ? com.google.common.collect.ImmutableSortedSet.of() : this.passes.build());
+ return new BuilderSingletonGuavaListsSets<T>(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<T> cards;
+ private @Singular ImmutableCollection<? extends Number> frogs;
+ private @SuppressWarnings("all") @Singular("rawSet") ImmutableSet rawSet;
+ private @Singular ImmutableSortedSet<String> passes;
+ @java.lang.SuppressWarnings("all") BuilderSingletonGuavaListsSets(final ImmutableList<T> cards, final ImmutableCollection<? extends Number> frogs, final ImmutableSet rawSet, final ImmutableSortedSet<String> passes) {
+ super();
+ this.cards = cards;
+ this.frogs = frogs;
+ this.rawSet = rawSet;
+ this.passes = passes;
+ }
+ public static @java.lang.SuppressWarnings("all") <T>BuilderSingletonGuavaListsSetsBuilder<T> builder() {
+ return new BuilderSingletonGuavaListsSetsBuilder<T>();
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java b/test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.java
new file mode 100644
index 00000000..33788df9
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderSingletonGuavaMaps.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 BuilderSingletonGuavaMaps<K, V> {
+ public static @java.lang.SuppressWarnings("all") class BuilderSingletonGuavaMapsBuilder<K, V> {
+ private com.google.common.collect.ImmutableMap.Builder<K, V> battleaxes;
+ private com.google.common.collect.ImmutableSortedMap.Builder<Integer, V> vertices;
+ private com.google.common.collect.ImmutableBiMap.Builder<java.lang.Object, java.lang.Object> rawMap;
+ @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMapsBuilder<K, V> 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<K, V> battleaxes(java.util.Map<? extends K, ? extends V> 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<K, V> 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<K, V> vertices(java.util.Map<? extends Integer, ? extends V> 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<K, V> 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<K, V> 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<K, V> build() {
+ com.google.common.collect.ImmutableMap<K, V> battleaxes = ((this.battleaxes == null) ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build());
+ com.google.common.collect.ImmutableSortedMap<Integer, V> vertices = ((this.vertices == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build());
+ com.google.common.collect.ImmutableBiMap<java.lang.Object, java.lang.Object> rawMap = ((this.rawMap == null) ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build());
+ return new BuilderSingletonGuavaMaps<K, V>(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<K, V> battleaxes;
+ private @Singular ImmutableSortedMap<Integer, ? extends V> vertices;
+ private @SuppressWarnings("all") @Singular("rawMap") ImmutableBiMap rawMap;
+ @java.lang.SuppressWarnings("all") BuilderSingletonGuavaMaps(final ImmutableMap<K, V> battleaxes, final ImmutableSortedMap<Integer, ? extends V> vertices, final ImmutableBiMap rawMap) {
+ super();
+ this.battleaxes = battleaxes;
+ this.vertices = vertices;
+ this.rawMap = rawMap;
+ }
+ public static @java.lang.SuppressWarnings("all") <K, V>BuilderSingletonGuavaMapsBuilder<K, V> builder() {
+ return new BuilderSingletonGuavaMapsBuilder<K, V>();
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java
index 38cb0038..8fb42a59 100644
--- a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java
+++ b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java
@@ -1,4 +1,4 @@
-import lombok.experimental.Builder;
+import lombok.Builder;
class BuilderWithExistingBuilderClass<T, K extends Number> {
public static class BuilderWithExistingBuilderClassBuilder<Z extends Number> {
private boolean arg2;
diff --git a/test/transform/resource/before/BuilderSingletonGuavaListsSets.java b/test/transform/resource/before/BuilderSingletonGuavaListsSets.java
index 060d2903..e94d84b6 100644
--- a/test/transform/resource/before/BuilderSingletonGuavaListsSets.java
+++ b/test/transform/resource/before/BuilderSingletonGuavaListsSets.java
@@ -9,6 +9,6 @@ import lombok.Singular;
class BuilderSingletonGuavaListsSets<T> {
@Singular private ImmutableList<T> cards;
@Singular private ImmutableCollection<? extends Number> frogs;
- @Singular("rawSet") private ImmutableSet rawSet;
+ @SuppressWarnings("all") @Singular("rawSet") private ImmutableSet rawSet;
@Singular private ImmutableSortedSet<String> passes;
}
diff --git a/test/transform/resource/before/BuilderSingletonGuavaMaps.java b/test/transform/resource/before/BuilderSingletonGuavaMaps.java
index 2271b9d9..1ff00c5b 100644
--- a/test/transform/resource/before/BuilderSingletonGuavaMaps.java
+++ b/test/transform/resource/before/BuilderSingletonGuavaMaps.java
@@ -8,5 +8,5 @@ import lombok.Singular;
class BuilderSingletonGuavaMaps<K, V> {
@Singular private ImmutableMap<K, V> battleaxes;
@Singular private ImmutableSortedMap<Integer, ? extends V> vertices;
- @Singular("rawMap") private ImmutableBiMap rawMap;
+ @SuppressWarnings("all") @Singular("rawMap") private ImmutableBiMap rawMap;
}
diff --git a/test/transform/resource/before/BuilderWithExistingBuilderClass.java b/test/transform/resource/before/BuilderWithExistingBuilderClass.java
index 262e3b85..c8e0a24b 100644
--- a/test/transform/resource/before/BuilderWithExistingBuilderClass.java
+++ b/test/transform/resource/before/BuilderWithExistingBuilderClass.java
@@ -1,4 +1,4 @@
-import lombok.experimental.Builder;
+import lombok.Builder;
class BuilderWithExistingBuilderClass<T, K extends Number> {
@Builder
diff --git a/test/transform/resource/messages-ecj/BuilderComplex.java.messages b/test/transform/resource/messages-ecj/BuilderComplex.java.messages
new file mode 100644
index 00000000..4856a80d
--- /dev/null
+++ b/test/transform/resource/messages-ecj/BuilderComplex.java.messages
@@ -0,0 +1 @@
+2 The type Builder is deprecated