[jboss-cvs] Re: jboss-cvs-commits Digest, Vol 37, Issue 197
Brian Stansberry
brian.stansberry at redhat.com
Tue Jul 14 16:00:13 EDT 2009
If you prefer "is" I'll gladly change it. I'm curious why you care
though; does the MC handle "is" more cleanly?
Regarding the javabeans spec, the only preference for "is" is that if
"is" and "get" both exist for a property, the property is read via "is".
8.3 Design Patterns for Properties
8.3.1 Simple properties
By default, we use design patterns to locate properties by
looking for methods of the form:
public <PropertyType> get<PropertyName>();
public void set<PropertyName>(<PropertyType> a);
.....
8.3.2 Boolean properties
In addition, for boolean properties, we allow a getter method
to match the pattern:
public boolean is<PropertyName>();
This “is<PropertyName>” method may be provided instead of a
“get<PropertyName>” method, or it may be provided in addition to a
“get<PropertyName>” method.
In either case, if the “is<PropertyName>” method is present
for a boolean property then we will use the “is<PropertyName>” method to
read the property value.
Ales Justin wrote:
> Why is this not isOverrideDistributableManager(), as per javabeans?
>
>> + /**
>> + * Gets whether the session <code>Manager</code> implementation
>> for + * distributable webapps should be overridden with an instance
>> of + * {@link #getManagerClass()}.
>> + * <p>
>> + * Setting this to <code>false</code> allows custom configuration of
>> + * a manager via a <code>context.xml</code>. Default is
>> <code>true</code>.
>> + * </p>
>> + * + * @return <code>true</code> if the manager should be
>> overridden,
>> + * <code>false</code> if the existing manager should be
>> retained.
>> + */
>> + public boolean getOverrideDistributableManager()
>> + {
>> + return overrideDistributableManager;
>> + }
>> +
>> + /**
>> + * Sets whether the session <code>Manager</code> implementation
>> for + * distributable webapps should be overridden with an instance
>> of + * {@link #getManagerClass()}.
>> + * <p>
>> + * Setting this to <code>false</code> allows custom configuration of
>> + * a manager via a <code>context.xml</code>. Default is
>> <code>true</code>.
>> + * </p>
>> + * + * @param override <code>true</code> if the manager should
>> be overridden,
>> + * <code>false</code> if the existing manager should be
>> retained.
>> + */
>> + public void setOverrideDistributableManager(boolean override)
>> + {
>> + this.overrideDistributableManager = override;
>> + }
--
Brian Stansberry
Lead, AS Clustering
JBoss by Red Hat
More information about the jboss-cvs-commits
mailing list