aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2011-07-18 20:59:52 +0200
committerRoel Spilker <r.spilker@gmail.com>2011-07-18 21:05:00 +0200
commit83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee (patch)
tree68f44e863293287e989b120a1d15de88de338a2a /test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java
parentaa1a0e7ac87f5e96a39d0bad670aa8c7b7df85d4 (diff)
downloadlombok-83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee.tar.gz
lombok-83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee.tar.bz2
lombok-83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee.zip
Now either all or none of equals/hashCode/canEqual is generated. Fixes issue 240.
Diffstat (limited to 'test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java')
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java
new file mode 100644
index 00000000..50b219f1
--- /dev/null
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java
@@ -0,0 +1,27 @@
+@lombok.EqualsAndHashCode class EqualsAndHashCodeWithExistingMethods {
+ int x;
+ EqualsAndHashCodeWithExistingMethods() {
+ super();
+ }
+ public int hashCode() {
+ return 42;
+ }
+}
+final @lombok.EqualsAndHashCode class EqualsAndHashCodeWithExistingMethods2 {
+ int x;
+ EqualsAndHashCodeWithExistingMethods2() {
+ super();
+ }
+ public boolean equals(Object other) {
+ return false;
+ }
+}
+final @lombok.EqualsAndHashCode(callSuper = true) class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithExistingMethods {
+ int x;
+ EqualsAndHashCodeWithExistingMethods3() {
+ super();
+ }
+ public boolean canEqual(Object other) {
+ return true;
+ }
+} \ No newline at end of file