mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 06:14:36 +00:00
[i623] added eclipse code for generating @javax.annotation.Generated, and refactored java impl to reduce DRY violations. -f pretty now includes skipping generation of this annotation, and updated ALL the test cases.
This commit is contained in:
1 parent
7efbecfe49
commit
a7bd812893
193 files changed
+1199
-613
No files matched your search
@@ -6,11 +6,13 @@ class EqualsAndHashCodeWithSomeExistingMethods {
|
||||
return 42;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public EqualsAndHashCodeWithSomeExistingMethods() {
|
||||
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public java.lang.String toString() {
|
||||
return "EqualsAndHashCodeWithSomeExistingMethods(x=" + this.x + ")";
|
||||
}
|
||||
@@ -21,10 +23,12 @@ class EqualsAndHashCodeWithSomeExistingMethods2 {
|
||||
return false;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public EqualsAndHashCodeWithSomeExistingMethods2() {
|
||||
}
|
||||
@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 EqualsAndHashCodeWithSomeExistingMethods2)) return false;
|
||||
@@ -35,6 +39,7 @@ class EqualsAndHashCodeWithSomeExistingMethods2 {
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
@@ -43,6 +48,7 @@ class EqualsAndHashCodeWithSomeExistingMethods2 {
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public java.lang.String toString() {
|
||||
return "EqualsAndHashCodeWithSomeExistingMethods2(x=" + this.x + ")";
|
||||
}
|
||||
@@ -56,10 +62,12 @@ class EqualsAndHashCodeWithAllExistingMethods {
|
||||
return false;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public EqualsAndHashCodeWithAllExistingMethods() {
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public java.lang.String toString() {
|
||||
return "EqualsAndHashCodeWithAllExistingMethods(x=" + this.x + ")";
|
||||
}
|
||||
@@ -67,11 +75,13 @@ class EqualsAndHashCodeWithAllExistingMethods {
|
||||
class EqualsAndHashCodeWithNoExistingMethods {
|
||||
int x;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public EqualsAndHashCodeWithNoExistingMethods() {
|
||||
|
||||
}
|
||||
@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 EqualsAndHashCodeWithNoExistingMethods)) return false;
|
||||
@@ -81,11 +91,13 @@ class EqualsAndHashCodeWithNoExistingMethods {
|
||||
return true;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
protected boolean canEqual(final java.lang.Object other) {
|
||||
return other instanceof EqualsAndHashCodeWithNoExistingMethods;
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
@@ -94,6 +106,7 @@ class EqualsAndHashCodeWithNoExistingMethods {
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
public java.lang.String toString() {
|
||||
return "EqualsAndHashCodeWithNoExistingMethods(x=" + this.x + ")";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user