aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/NullLibrary2.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-20 15:25:08 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-28 16:21:39 +0100
commite95680a76733c22ee5937a586ee50c703d5ba621 (patch)
tree3eaefce07c41760468c3c2a17c86297e2304a730 /test/transform/resource/after-delombok/NullLibrary2.java
parentfa70b194aa7db62bdbc4cc759a606f97fe50fc92 (diff)
downloadlombok-e95680a76733c22ee5937a586ee50c703d5ba621.tar.gz
lombok-e95680a76733c22ee5937a586ee50c703d5ba621.tar.bz2
lombok-e95680a76733c22ee5937a586ee50c703d5ba621.zip
[issue #2221] [issue #788] Lombok now adds nullity annotations.
Which 'flavour' is defined in lombok.config; applied to toString, equals, canEqual, and plural-form of `@Singular`.
Diffstat (limited to 'test/transform/resource/after-delombok/NullLibrary2.java')
-rw-r--r--test/transform/resource/after-delombok/NullLibrary2.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/NullLibrary2.java b/test/transform/resource/after-delombok/NullLibrary2.java
new file mode 100644
index 00000000..8f48c8a5
--- /dev/null
+++ b/test/transform/resource/after-delombok/NullLibrary2.java
@@ -0,0 +1,43 @@
+public class NullLibrary2 {
+ String foo;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(@org.springframework.lang.Nullable final 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;
+ }
+ @java.lang.SuppressWarnings("all")
+ protected boolean canEqual(@org.springframework.lang.Nullable final java.lang.Object other) {
+ return other instanceof NullLibrary2;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public 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;
+ }
+ @org.springframework.lang.NonNull
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "NullLibrary2(foo=" + this.foo + ")";
+ }
+ @java.lang.SuppressWarnings("all")
+ public NullLibrary2(final String foo) {
+ this.foo = foo;
+ }
+ @org.springframework.lang.NonNull
+ @java.lang.SuppressWarnings("all")
+ public NullLibrary2 withFoo(final String foo) {
+ return this.foo == foo ? this : new NullLibrary2(foo);
+ }
+}