java - Valid JavaBeans names for boolean getter methods -
I know that the most variable name will work with "is", like isBlue () , But "is" is also a valid prefix, such as is property () ?
According to Section 8.3.2:
Boolean Properties
Also, for Boolean properties, we allow the method that matches the pattern:
Public Boolean & lt; Property Name & gt; ();This "
isPropertyName" method "get" method, or "get & lt; property name & Gt;"In addition to the method, in any case, ifis & lt; Property Name & gt;The method exists for a Boolean property, so we can have an example Boolean property for "property <">to read the property value:public boolean Marupial (); Public Zero Set Marsipial (Boolean M);
Until something has not changed, unless is is not a valid prefix , I'm scared :(
It is possible that some devices and libraries identify such properties in any way Gay, but count on it is not good.
Comments
Post a Comment