mwKART :
I am having a boolean variable hasObject
in lombok which generates isHasObject()
. I am using @Data
lombok annotation. How can i change the method to hasObject()
mwKART :
I found out help from lombok-how-to-customise-getter-for-boolean-object-field. By this I will be have the altering accessor level and the code getter old fashion,
@Getter(AccessLevel.NONE) private boolean hasObject;
public boolean hasObject() {
return hasObject;
}
I will be keeping this question open. Is this the only way to change getter method name or I will wait for better suggestions.
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=454216&siteId=1