I am using Java lombok annotation @Getter to generate getters for my POJO. I have a \'boolean\' field by the name \'isAbc\'. The @Getter annotation in this case generates a
Lombok does not prefix with is
if the name already starts with is
followed by an uppercase letter as in isGood
.
You might encounter names like canDelete
which too some frustration will have a getter generated with the name isCanDelete
. To avoid this you can use the fluent
parameter as in:
@Getter(fluent = true)
private boolean canDelete;
or (depending on version):
@Getter
@Accessors(fluent = true)
private boolean canDelete;
In which case it will leave the name as is.