mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-28 18:23:13 +00:00
e5705f94cd
* Added ‘format’ directive for tests. * Updates tests to salt in some more format and config keys.
49 lines
719 B
Java
49 lines
719 B
Java
//CONF: lombok.addGeneratedAnnotation = false
|
|
import lombok.*;
|
|
import static lombok.AccessLevel.NONE;
|
|
|
|
@Data
|
|
@Getter(NONE)
|
|
@Setter(NONE)
|
|
class EqualsAndHashCodeWithSomeExistingMethods {
|
|
int x;
|
|
|
|
public int hashCode() {
|
|
return 42;
|
|
}
|
|
}
|
|
|
|
@Data
|
|
@Getter(NONE)
|
|
@Setter(NONE)
|
|
class EqualsAndHashCodeWithSomeExistingMethods2 {
|
|
int x;
|
|
|
|
protected boolean canEqual(Object other) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Data
|
|
@Getter(NONE)
|
|
@Setter(NONE)
|
|
class EqualsAndHashCodeWithAllExistingMethods {
|
|
int x;
|
|
|
|
public int hashCode() {
|
|
return 42;
|
|
}
|
|
|
|
public boolean equals(Object other) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Data
|
|
@Getter(AccessLevel.NONE)
|
|
@Setter(lombok.AccessLevel.NONE)
|
|
class EqualsAndHashCodeWithNoExistingMethods {
|
|
int x;
|
|
}
|
|
|