It looks like everyone says that right getter for:
- primitive boolean -> getter is
- object Boolean -> getter get
Example:
public class Test {
private boolean primitive;
private Boolean object;
public boolean isPrimitive() {
return primitive;
}
public Boolean getObject() {
return object;
}
//..
}
Question:
Is there any spec or document that states this is correct and this is the way to specify getters for boolean values? Or this is only a common assumption?
I'm asking becouse for example wsimport generates getter is for Boolean object. Is this a tool bug, or this is allowed and correct?
In the other hand some framweorks don't work properly with such getters. For example JSF (EL) or Dozer.
object
– Snyderis
in my opinion only works if the boolean name is an adjective and not a noun. – AgglomerateJsonElement.isJsonArray()
– Monotypehas
whenis
doesn't really sound right XD – Anastomosis