Closed thibaultmeyer closed 7 years ago
I don't think we need the is*
setters. According to the Java Beans specification:
Boolean properties
In addition, for boolean properties, we allow a getter method to match the pattern:
public boolean is<PropertyName>();
This "is
" method may be provided instead of a "get " method, or it may be provided in addition to a "get " method. In either case, if the "is
" method is present for a boolean property then we will use the "is " method to read the property value. An example boolean property might be:
public boolean isMarsupial(); public void setMarsupial(boolean m);
So, we can reduce it to generate just the following methods:
public boolean isMarsupial();
public boolean getMarsupial();
public void setMarsupial(boolean m);
WDYT?
Sure, I will do modifications today
Thanks, @0xbaadf00d.
Related to #7, boolean fields are now handled with extra getter / setter names.
getX
andsetX
for boolean fields are been keep to avoid API breaking.Unit tests added too.
Will be enhanced as