aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java88
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java28
-rw-r--r--test/transform/resource/after-ecj/NullLibrary1.java37
-rw-r--r--test/transform/resource/after-ecj/NullLibrary2.java37
4 files changed, 162 insertions, 28 deletions
diff --git a/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java b/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java
new file mode 100644
index 00000000..308a5174
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java
@@ -0,0 +1,88 @@
+import java.util.List;
+import lombok.Singular;
+import lombok.Singular.NullCollectionBehavior;
+@lombok.Builder class BuilderSingularNullBehavior2 {
+ public static @java.lang.SuppressWarnings("all") class BuilderSingularNullBehavior2Builder {
+ private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> locations;
+ private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> doohickeys;
+ @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2Builder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder location(final String location) {
+ if ((this.locations == null))
+ this.locations = new java.util.ArrayList<String>();
+ this.locations.add(location);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(final java.util. @org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> locations) {
+ java.util.Objects.requireNonNull(locations, "locations cannot be null");
+ if ((this.locations == null))
+ this.locations = new java.util.ArrayList<String>();
+ this.locations.addAll(locations);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearLocations() {
+ if ((this.locations != null))
+ this.locations.clear();
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder doohickey(final String doohickey) {
+ if ((this.doohickeys == null))
+ this.doohickeys = new java.util.ArrayList<String>();
+ this.doohickeys.add(doohickey);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder doohickeys(final java.util. @org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> doohickeys) {
+ if ((doohickeys != null))
+ {
+ if ((this.doohickeys == null))
+ this.doohickeys = new java.util.ArrayList<String>();
+ this.doohickeys.addAll(doohickeys);
+ }
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearDoohickeys() {
+ if ((this.doohickeys != null))
+ this.doohickeys.clear();
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2 build() {
+ java.util.List<String> locations;
+ switch (((this.locations == null) ? 0 : this.locations.size())) {
+ case 0 :
+ locations = java.util.Collections.emptyList();
+ break;
+ case 1 :
+ locations = java.util.Collections.singletonList(this.locations.get(0));
+ break;
+ default :
+ locations = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.locations));
+ }
+ java.util.List<String> doohickeys;
+ switch (((this.doohickeys == null) ? 0 : this.doohickeys.size())) {
+ case 0 :
+ doohickeys = java.util.Collections.emptyList();
+ break;
+ case 1 :
+ doohickeys = java.util.Collections.singletonList(this.doohickeys.get(0));
+ break;
+ default :
+ doohickeys = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.doohickeys));
+ }
+ return new BuilderSingularNullBehavior2(locations, doohickeys);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() {
+ return (((("BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(locations=" + this.locations) + ", doohickeys=") + this.doohickeys) + ")");
+ }
+ }
+ private @Singular(nullBehavior = Singular.NullCollectionBehavior.JDK) List<String> locations;
+ private @Singular(nullBehavior = lombok.Singular.NullCollectionBehavior.IGNORE) List<String> doohickeys;
+ @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2(final List<String> locations, final List<String> doohickeys) {
+ super();
+ this.locations = locations;
+ this.doohickeys = doohickeys;
+ }
+ public static @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder builder() {
+ return new BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder();
+ }
+}
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java
deleted file mode 100644
index 4781839d..00000000
--- a/test/transform/resource/after-ecj/EqualsAndHashCodeWithNNBD.java
+++ /dev/null
@@ -1,28 +0,0 @@
-import javax.annotation.ParametersAreNonnullByDefault;
-@ParametersAreNonnullByDefault class EqualsAndHashCodeWithNNBD {
- static @lombok.EqualsAndHashCode @org.eclipse.jdt.annotation.NonNullByDefault class Inner {
- Inner() {
- super();
- }
- public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.@javax.annotation.Nullable @org.eclipse.jdt.annotation.Nullable Object o) {
- if ((o == this))
- return true;
- if ((! (o instanceof EqualsAndHashCodeWithNNBD.Inner)))
- return false;
- final EqualsAndHashCodeWithNNBD.Inner other = (EqualsAndHashCodeWithNNBD.Inner) o;
- if ((! other.canEqual((java.lang.Object) this)))
- return false;
- return true;
- }
- protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) {
- return (other instanceof EqualsAndHashCodeWithNNBD.Inner);
- }
- public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
- final int result = 1;
- return result;
- }
- }
- EqualsAndHashCodeWithNNBD() {
- super();
- }
-} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/NullLibrary1.java b/test/transform/resource/after-ecj/NullLibrary1.java
new file mode 100644
index 00000000..baea9e7a
--- /dev/null
+++ b/test/transform/resource/after-ecj/NullLibrary1.java
@@ -0,0 +1,37 @@
+public @lombok.EqualsAndHashCode @lombok.ToString @lombok.AllArgsConstructor class NullLibrary1 {
+ @lombok.With String foo;
+ public @org.eclipse.jdt.annotation.NonNull @java.lang.SuppressWarnings("all") NullLibrary1 withFoo(final String foo) {
+ return ((this.foo == foo) ? this : new NullLibrary1(foo));
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.@org.eclipse.jdt.annotation.Nullable Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof NullLibrary1)))
+ return false;
+ final NullLibrary1 other = (NullLibrary1) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ final java.lang.Object this$foo = this.foo;
+ final java.lang.Object other$foo = other.foo;
+ if (((this$foo == null) ? (other$foo != null) : (! this$foo.equals(other$foo))))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.@org.eclipse.jdt.annotation.Nullable Object other) {
+ return (other instanceof NullLibrary1);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final java.lang.Object $foo = this.foo;
+ result = ((result * PRIME) + (($foo == null) ? 43 : $foo.hashCode()));
+ return result;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.@org.eclipse.jdt.annotation.NonNull String toString() {
+ return (("NullLibrary1(foo=" + this.foo) + ")");
+ }
+ public @java.lang.SuppressWarnings("all") NullLibrary1(final String foo) {
+ super();
+ this.foo = foo;
+ }
+}
diff --git a/test/transform/resource/after-ecj/NullLibrary2.java b/test/transform/resource/after-ecj/NullLibrary2.java
new file mode 100644
index 00000000..60ad103f
--- /dev/null
+++ b/test/transform/resource/after-ecj/NullLibrary2.java
@@ -0,0 +1,37 @@
+public @lombok.EqualsAndHashCode @lombok.ToString @lombok.AllArgsConstructor class NullLibrary2 {
+ @lombok.With String foo;
+ public @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") NullLibrary2 withFoo(final String foo) {
+ return ((this.foo == foo) ? this : new NullLibrary2(foo));
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final @org.springframework.lang.Nullable java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof NullLibrary2)))
+ return false;
+ final NullLibrary2 other = (NullLibrary2) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ final java.lang.Object this$foo = this.foo;
+ final java.lang.Object other$foo = other.foo;
+ if (((this$foo == null) ? (other$foo != null) : (! this$foo.equals(other$foo))))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") boolean canEqual(final @org.springframework.lang.Nullable java.lang.Object other) {
+ return (other instanceof NullLibrary2);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ final java.lang.Object $foo = this.foo;
+ result = ((result * PRIME) + (($foo == null) ? 43 : $foo.hashCode()));
+ return result;
+ }
+ public @java.lang.Override @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("NullLibrary2(foo=" + this.foo) + ")");
+ }
+ public @java.lang.SuppressWarnings("all") NullLibrary2(final String foo) {
+ super();
+ this.foo = foo;
+ }
+}