aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/DataOnLocalClass.java2
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java56
-rw-r--r--test/transform/resource/after-ecj/DataOnLocalClass.java2
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java58
-rw-r--r--test/transform/resource/before/EqualsAndHashCodeNestedShadow.java15
5 files changed, 131 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java
index 90ae7649..9fe16070 100644
--- a/test/transform/resource/after-delombok/DataOnLocalClass.java
+++ b/test/transform/resource/after-delombok/DataOnLocalClass.java
@@ -97,7 +97,7 @@ class DataOnLocalClass2 {
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Local.InnerLocal)) return false;
- final InnerLocal other = (InnerLocal) o;
+ final Local.InnerLocal other = (Local.InnerLocal) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$name = this.getName();
final java.lang.Object other$name = other.getName();
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java
new file mode 100644
index 00000000..ac687d84
--- /dev/null
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java
@@ -0,0 +1,56 @@
+interface EqualsAndHashCodeNestedShadow {
+ interface Foo {
+ }
+ class Bar {
+ public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof EqualsAndHashCodeNestedShadow.Bar.Foo)) return false;
+ final EqualsAndHashCodeNestedShadow.Bar.Foo other = (EqualsAndHashCodeNestedShadow.Bar.Foo) o;
+ if (!other.canEqual((java.lang.Object) this)) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ protected boolean canEqual(final java.lang.Object other) {
+ return other instanceof EqualsAndHashCodeNestedShadow.Bar.Foo;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public int hashCode() {
+ int result = 1;
+ return result;
+ }
+ }
+ }
+ class Baz {
+ public static class Foo<T> extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof EqualsAndHashCodeNestedShadow.Baz.Foo)) return false;
+ final EqualsAndHashCodeNestedShadow.Baz.Foo<?> other = (EqualsAndHashCodeNestedShadow.Baz.Foo<?>) o;
+ if (!other.canEqual((java.lang.Object) this)) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ protected boolean canEqual(final java.lang.Object other) {
+ return other instanceof EqualsAndHashCodeNestedShadow.Baz.Foo;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public int hashCode() {
+ int result = 1;
+ return result;
+ }
+ }
+ }
+}
diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java
index 9d6bced1..a86837e3 100644
--- a/test/transform/resource/after-ecj/DataOnLocalClass.java
+++ b/test/transform/resource/after-ecj/DataOnLocalClass.java
@@ -73,7 +73,7 @@ class DataOnLocalClass2 {
return true;
if ((! (o instanceof Local.InnerLocal)))
return false;
- final InnerLocal other = (InnerLocal) o;
+ final Local.InnerLocal other = (Local.InnerLocal) o;
if ((! other.canEqual((java.lang.Object) this)))
return false;
final java.lang.Object this$name = this.getName();
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java
new file mode 100644
index 00000000..5af6e9d8
--- /dev/null
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java
@@ -0,0 +1,58 @@
+interface EqualsAndHashCodeNestedShadow {
+ interface Foo {
+ }
+ class Bar {
+ public static @lombok.EqualsAndHashCode(callSuper = false) class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
+ public Foo() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeNestedShadow.Bar.Foo)))
+ return false;
+ final EqualsAndHashCodeNestedShadow.Bar.Foo other = (EqualsAndHashCodeNestedShadow.Bar.Foo) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) {
+ return (other instanceof EqualsAndHashCodeNestedShadow.Bar.Foo);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
+ int result = 1;
+ return result;
+ }
+ }
+ Bar() {
+ super();
+ }
+ }
+ class Baz {
+ public static @lombok.EqualsAndHashCode(callSuper = false) class Foo<T> extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
+ public Foo() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeNestedShadow.Baz.Foo)))
+ return false;
+ final EqualsAndHashCodeNestedShadow.Baz.Foo<?> other = (EqualsAndHashCodeNestedShadow.Baz.Foo<?>) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) {
+ return (other instanceof EqualsAndHashCodeNestedShadow.Baz.Foo);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
+ int result = 1;
+ return result;
+ }
+ }
+ Baz() {
+ super();
+ }
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/before/EqualsAndHashCodeNestedShadow.java
new file mode 100644
index 00000000..2b0c4fa3
--- /dev/null
+++ b/test/transform/resource/before/EqualsAndHashCodeNestedShadow.java
@@ -0,0 +1,15 @@
+interface EqualsAndHashCodeNestedShadow {
+ interface Foo {
+ }
+ class Bar {
+ @lombok.EqualsAndHashCode(callSuper=false)
+ public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
+ }
+ }
+
+ class Baz {
+ @lombok.EqualsAndHashCode(callSuper=false)
+ public static class Foo<T> extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
+ }
+ }
+} \ No newline at end of file