aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-11-08 18:02:01 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-11-08 18:02:01 +0100
commitc318bb7a0ab6b28fef262ea89bf2b7cdc7ac610f (patch)
treed82ffe624e8861b1e5966108a1175554e0f1bef8 /test/transform/resource/after-delombok
parent46feeaab85916c8b6de5edee1c67a995331ae97f (diff)
parent6e5acaca49bff5af2b174078fb18b9015ae1bb71 (diff)
downloadlombok-c318bb7a0ab6b28fef262ea89bf2b7cdc7ac610f.tar.gz
lombok-c318bb7a0ab6b28fef262ea89bf2b7cdc7ac610f.tar.bz2
lombok-c318bb7a0ab6b28fef262ea89bf2b7cdc7ac610f.zip
Merge branch 'master' of github.com:rzwitserloot/lombok
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/DataExtended.java8
-rw-r--r--test/transform/resource/after-delombok/DataIgnore.java10
-rw-r--r--test/transform/resource/after-delombok/DataOnLocalClass.java24
-rw-r--r--test/transform/resource/after-delombok/DataPlain.java100
-rw-r--r--test/transform/resource/after-delombok/DataWithGetter.java8
-rw-r--r--test/transform/resource/after-delombok/DataWithGetterNone.java8
6 files changed, 139 insertions, 19 deletions
diff --git a/test/transform/resource/after-delombok/DataExtended.java b/test/transform/resource/after-delombok/DataExtended.java
index 6f55bc2c..be1c3b74 100644
--- a/test/transform/resource/after-delombok/DataExtended.java
+++ b/test/transform/resource/after-delombok/DataExtended.java
@@ -15,12 +15,16 @@ class DataExtended {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof DataExtended)) return false;
final DataExtended other = (DataExtended)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof DataExtended;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
diff --git a/test/transform/resource/after-delombok/DataIgnore.java b/test/transform/resource/after-delombok/DataIgnore.java
index 7e81432d..9f2a7d79 100644
--- a/test/transform/resource/after-delombok/DataIgnore.java
+++ b/test/transform/resource/after-delombok/DataIgnore.java
@@ -14,12 +14,16 @@ class DataIgnore {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof DataIgnore)) return false;
final DataIgnore other = (DataIgnore)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof DataIgnore;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -33,4 +37,4 @@ class DataIgnore {
public java.lang.String toString() {
return "DataIgnore(x=" + this.getX() + ")";
}
-}
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java
index bb3f564d..02101a81 100644
--- a/test/transform/resource/after-delombok/DataOnLocalClass.java
+++ b/test/transform/resource/after-delombok/DataOnLocalClass.java
@@ -23,13 +23,17 @@ class DataOnLocalClass1 {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof Local)) return false;
final Local other = (Local)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof Local;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -73,12 +77,16 @@ class DataOnLocalClass2 {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof InnerLocal)) return false;
final InnerLocal other = (InnerLocal)o;
+ if (!other.canEqual(this)) return false;
if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof InnerLocal;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -105,12 +113,16 @@ class DataOnLocalClass2 {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof Local)) return false;
final Local other = (Local)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof Local;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java
index 1e11a33d..ef86f9d7 100644
--- a/test/transform/resource/after-delombok/DataPlain.java
+++ b/test/transform/resource/after-delombok/DataPlain.java
@@ -22,13 +22,17 @@ class Data1 {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof Data1)) return false;
final Data1 other = (Data1)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof Data1;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -68,13 +72,17 @@ class Data2 {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof Data2)) return false;
final Data2 other = (Data2)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof Data2;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -90,3 +98,87 @@ class Data2 {
return "Data2(x=" + this.getX() + ", name=" + this.getName() + ")";
}
}
+final class Data3 {
+ final int x;
+ String name;
+ @java.beans.ConstructorProperties({"x"})
+ @java.lang.SuppressWarnings("all")
+ public Data3(final int x) {
+ this.x = x;
+ }
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+ @java.lang.SuppressWarnings("all")
+ public String getName() {
+ return this.name;
+ }
+ @java.lang.SuppressWarnings("all")
+ public void setName(final String name) {
+ this.name = name;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof Data3)) return false;
+ final Data3 other = (Data3)o;
+ if (this.getX() != other.getX()) return false;
+ if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
+ return true;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = result * PRIME + this.getX();
+ result = result * PRIME + (this.getName() == null ? 0 : this.getName().hashCode());
+ return result;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "Data3(x=" + this.getX() + ", name=" + this.getName() + ")";
+ }
+}
+final class Data4 extends java.util.Timer {
+ final int x;
+ Data4() {
+ super();
+ }
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "Data4(x=" + this.getX() + ")";
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof Data4)) return false;
+ final Data4 other = (Data4)o;
+ if (!other.canEqual(this)) return false;
+ if (!super.equals(o)) return false;
+ if (this.getX() != other.getX()) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof Data4;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = result * PRIME + super.hashCode();
+ result = result * PRIME + this.getX();
+ return result;
+ }
+}
diff --git a/test/transform/resource/after-delombok/DataWithGetter.java b/test/transform/resource/after-delombok/DataWithGetter.java
index 28b8dee0..1e181370 100644
--- a/test/transform/resource/after-delombok/DataWithGetter.java
+++ b/test/transform/resource/after-delombok/DataWithGetter.java
@@ -19,14 +19,18 @@ class DataWithGetter {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof DataWithGetter)) return false;
final DataWithGetter other = (DataWithGetter)o;
+ if (!other.canEqual(this)) return false;
if (this.getX() != other.getX()) return false;
if (this.getY() != other.getY()) return false;
if (this.getZ() == null ? other.getZ() != null : !this.getZ().equals(other.getZ())) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof DataWithGetter;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
diff --git a/test/transform/resource/after-delombok/DataWithGetterNone.java b/test/transform/resource/after-delombok/DataWithGetterNone.java
index 161c70f9..b1cab7cf 100644
--- a/test/transform/resource/after-delombok/DataWithGetterNone.java
+++ b/test/transform/resource/after-delombok/DataWithGetterNone.java
@@ -19,14 +19,18 @@ class DataWithGetterNone {
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof DataWithGetterNone)) return false;
final DataWithGetterNone other = (DataWithGetterNone)o;
+ if (!other.canEqual(this)) return false;
if (this.x != other.x) return false;
if (this.y != other.y) return false;
if (this.z == null ? other.z != null : !this.z.equals(other.z)) return false;
return true;
}
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof DataWithGetterNone;
+ }
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {