diff options
author | Roel Spilker <r.spilker@gmail.com> | 2011-07-18 20:59:52 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2011-07-18 21:05:00 +0200 |
commit | 83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee (patch) | |
tree | 68f44e863293287e989b120a1d15de88de338a2a /test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java | |
parent | aa1a0e7ac87f5e96a39d0bad670aa8c7b7df85d4 (diff) | |
download | lombok-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/before/EqualsAndHashCodeWithExistingMethods.java')
-rw-r--r-- | test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java new file mode 100644 index 00000000..be90d871 --- /dev/null +++ b/test/transform/resource/before/EqualsAndHashCodeWithExistingMethods.java @@ -0,0 +1,26 @@ +@lombok.EqualsAndHashCode +class EqualsAndHashCodeWithExistingMethods { + int x; + + public int hashCode() { + return 42; + } +} + +@lombok.EqualsAndHashCode +final class EqualsAndHashCodeWithExistingMethods2 { + int x; + + public boolean equals(Object other) { + return false; + } +} + +@lombok.EqualsAndHashCode(callSuper=true) +final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithExistingMethods { + int x; + + public boolean canEqual(Object other) { + return true; + } +}
\ No newline at end of file |