aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java28
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInners.java32
-rw-r--r--test/transform/resource/before/DataWithGenericsOnInners.java4
-rw-r--r--test/transform/resource/before/EqualsAndHashCodeWithGenericsOnInners.java6
4 files changed, 66 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java
new file mode 100644
index 00000000..501d45a1
--- /dev/null
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java
@@ -0,0 +1,28 @@
+public class EqualsAndHashCodeWithGenericsOnInners<A> {
+ class Inner<B> {
+ int x;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof EqualsAndHashCodeWithGenericsOnInners.Inner)) return false;
+ final EqualsAndHashCodeWithGenericsOnInners<?>.Inner<?> other = (EqualsAndHashCodeWithGenericsOnInners<?>.Inner<?>) o;
+ if (!other.canEqual((java.lang.Object) this)) return false;
+ if (this.x != other.x) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ protected boolean canEqual(final java.lang.Object other) {
+ return other instanceof EqualsAndHashCodeWithGenericsOnInners.Inner;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ result = result * PRIME + this.x;
+ return result;
+ }
+ }
+}
+
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInners.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInners.java
new file mode 100644
index 00000000..164d0f15
--- /dev/null
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInners.java
@@ -0,0 +1,32 @@
+public class EqualsAndHashCodeWithGenericsOnInners<A> {
+ @lombok.EqualsAndHashCode class Inner<B> {
+ int x;
+ Inner() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeWithGenericsOnInners.Inner)))
+ return false;
+ final EqualsAndHashCodeWithGenericsOnInners<?>.Inner<?> other = (EqualsAndHashCodeWithGenericsOnInners<?>.Inner<?>) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ if ((this.x != other.x))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) {
+ return (other instanceof EqualsAndHashCodeWithGenericsOnInners.Inner);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ result = ((result * PRIME) + this.x);
+ return result;
+ }
+ }
+ public EqualsAndHashCodeWithGenericsOnInners() {
+ super();
+ }
+}
diff --git a/test/transform/resource/before/DataWithGenericsOnInners.java b/test/transform/resource/before/DataWithGenericsOnInners.java
deleted file mode 100644
index c0afacee..00000000
--- a/test/transform/resource/before/DataWithGenericsOnInners.java
+++ /dev/null
@@ -1,4 +0,0 @@
-public class DataWithGenericsOnInners<A> {
- @lombok.Data class Inner<B> {}
-}
-
diff --git a/test/transform/resource/before/EqualsAndHashCodeWithGenericsOnInners.java b/test/transform/resource/before/EqualsAndHashCodeWithGenericsOnInners.java
new file mode 100644
index 00000000..7af1d054
--- /dev/null
+++ b/test/transform/resource/before/EqualsAndHashCodeWithGenericsOnInners.java
@@ -0,0 +1,6 @@
+public class EqualsAndHashCodeWithGenericsOnInners<A> {
+ @lombok.EqualsAndHashCode class Inner<B> {
+ int x;
+ }
+}
+