aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-01-16 03:27:05 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-01-16 03:27:05 +0100
commit06f362980339febfe639eb4f59217ecc65fded42 (patch)
treeb21ec08c7fa1ef06fa980e54fc9a3f41bc19782b /test/transform
parenta05360a8eaba0de61f16f75816daf5a5af0a4567 (diff)
downloadlombok-06f362980339febfe639eb4f59217ecc65fded42.tar.gz
lombok-06f362980339febfe639eb4f59217ecc65fded42.tar.bz2
lombok-06f362980339febfe639eb4f59217ecc65fded42.zip
added j.u.List support for eclipse for @Singular @Builder.
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/BuilderSingletonLists.java1
-rw-r--r--test/transform/resource/after-delombok/BuilderSingletonMaps.java1
-rw-r--r--test/transform/resource/after-delombok/BuilderSingletonSets.java1
-rw-r--r--test/transform/resource/after-ecj/BuilderSingletonLists.java107
-rw-r--r--test/transform/resource/before/BuilderSingletonLists.java2
5 files changed, 111 insertions, 1 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingletonLists.java b/test/transform/resource/after-delombok/BuilderSingletonLists.java
index 394bd482..1c93f40a 100644
--- a/test/transform/resource/after-delombok/BuilderSingletonLists.java
+++ b/test/transform/resource/after-delombok/BuilderSingletonLists.java
@@ -3,6 +3,7 @@ import java.util.Collection;
class BuilderSingletonLists<T> {
private List<T> children;
private Collection<? extends Number> scarves;
+ @SuppressWarnings("all")
private List rawList;
@java.lang.SuppressWarnings("all")
BuilderSingletonLists(final List<T> children, final Collection<? extends Number> scarves, final List rawList) {
diff --git a/test/transform/resource/after-delombok/BuilderSingletonMaps.java b/test/transform/resource/after-delombok/BuilderSingletonMaps.java
index 3fa372d5..a6474975 100644
--- a/test/transform/resource/after-delombok/BuilderSingletonMaps.java
+++ b/test/transform/resource/after-delombok/BuilderSingletonMaps.java
@@ -3,6 +3,7 @@ import java.util.SortedMap;
class BuilderSingletonMaps<K, V> {
private Map<K, V> women;
private SortedMap<K, ? extends Number> men;
+ @SuppressWarnings("all")
private Map rawMap;
private Map<String, V> stringMap;
@java.lang.SuppressWarnings("all")
diff --git a/test/transform/resource/after-delombok/BuilderSingletonSets.java b/test/transform/resource/after-delombok/BuilderSingletonSets.java
index 1b71a56c..c57331a5 100644
--- a/test/transform/resource/after-delombok/BuilderSingletonSets.java
+++ b/test/transform/resource/after-delombok/BuilderSingletonSets.java
@@ -3,6 +3,7 @@ import java.util.SortedSet;
class BuilderSingletonSets<T> {
private Set<T> dangerMice;
private SortedSet<? extends Number> octopodes;
+ @SuppressWarnings("all")
private Set rawSet;
private Set<String> stringSet;
@java.lang.SuppressWarnings("all")
diff --git a/test/transform/resource/after-ecj/BuilderSingletonLists.java b/test/transform/resource/after-ecj/BuilderSingletonLists.java
new file mode 100644
index 00000000..05f6e6e9
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderSingletonLists.java
@@ -0,0 +1,107 @@
+import java.util.List;
+import java.util.Collection;
+
+import lombok.Singular;
+@lombok.Builder class BuilderSingletonLists<T> {
+ public static @java.lang.SuppressWarnings("all") class BuilderSingletonListsBuilder<T> {
+ private java.util.ArrayList<T> children;
+ private java.util.ArrayList<Number> scarves;
+ private java.util.ArrayList<java.lang.Object> rawList;
+ @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder<T> child(T child) {
+ if ((this.children == null))
+ this.children = new java.util.ArrayList<T>();
+ this.children.add(child);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder<T> children(java.util.Collection<? extends T> children) {
+ if ((this.children == null))
+ this.children = new java.util.ArrayList<T>();
+ this.children.addAll(children);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder<T> scarf(Number scarf) {
+ if ((this.scarves == null))
+ this.scarves = new java.util.ArrayList<Number>();
+ this.scarves.add(scarf);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder<T> scarves(java.util.Collection<? extends Number> scarves) {
+ if ((this.scarves == null))
+ this.scarves = new java.util.ArrayList<Number>();
+ this.scarves.addAll(scarves);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder<T> rawList(java.lang.Object rawList) {
+ if ((this.rawList == null))
+ this.rawList = new java.util.ArrayList<java.lang.Object>();
+ this.rawList.add(rawList);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonListsBuilder<T> rawList(java.util.Collection<?> rawList) {
+ if ((this.rawList == null))
+ this.rawList = new java.util.ArrayList<java.lang.Object>();
+ this.rawList.addAll(rawList);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingletonLists<T> build() {
+ java.util.List<T> 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<T>(this.children.size());
+ children.addAll(this.children);
+ children = java.util.Collections.unmodifiableList(children);
+ }
+ java.util.List<Number> 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<Number>(this.scarves.size());
+ scarves.addAll(this.scarves);
+ scarves = java.util.Collections.unmodifiableList(scarves);
+ }
+ java.util.List<java.lang.Object> 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<java.lang.Object>(this.rawList.size());
+ rawList.addAll(this.rawList);
+ rawList = java.util.Collections.unmodifiableList(rawList);
+ }
+ return new BuilderSingletonLists<T>(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<T> children;
+ private @Singular Collection<? extends Number> scarves;
+ private @SuppressWarnings("all") @Singular("rawList") List rawList;
+ @java.lang.SuppressWarnings("all") BuilderSingletonLists(final List<T> children, final Collection<? extends Number> scarves, final List rawList) {
+ super();
+ this.children = children;
+ this.scarves = scarves;
+ this.rawList = rawList;
+ }
+ public static @java.lang.SuppressWarnings("all") <T>BuilderSingletonListsBuilder<T> builder() {
+ return new BuilderSingletonListsBuilder<T>();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/BuilderSingletonLists.java b/test/transform/resource/before/BuilderSingletonLists.java
index 4f783244..ed57a5a8 100644
--- a/test/transform/resource/before/BuilderSingletonLists.java
+++ b/test/transform/resource/before/BuilderSingletonLists.java
@@ -7,5 +7,5 @@ import lombok.Singular;
class BuilderSingletonLists<T> {
@Singular private List<T> children;
@Singular private Collection<? extends Number> scarves;
- @Singular("rawList") private List rawList;
+ @SuppressWarnings("all") @Singular("rawList") private List rawList;
}