tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Kennedy" <>
Subject Re: Logic:Equal Question.
Date Thu, 08 May 2003 17:35:05 GMT
Michael, You are correct about the Bean Spec, see below:

JavaBeans Introspection
Sun Microsystems 55 7/24/97
Although use of the standard naming patterns is optional, we strongly
recommend their use as
standard naming conventions are an extremely valuable documentation

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);
If we discover a matching pair of "get<PropertyName>" and
 "set<PropertyName>" methods
that take and return the same type, then we regard these methods as defining
a read-write property
whose name will be "<propertyName>". We will use the "get<PropertyName>"
to get the property value and the "set<PropertyName>" method to set the
property value. The
pair of methods may be located either in the same class or one may be in a
base class and the
other may be in a derived class.
If we find only one of these methods, then we regard it as defining either a
read-only or a writeonly
property called "<propertyName>"
By default we assume that properties are neither bound nor constrained (see
Section 7).
So a simple read-write property "foo" might be represented by a pair of
public Wombat getFoo();
public void setFoo(Wombat w);

8.3.2 Boolean properties
In addition, for boolean properties, we allow a getter method to match the
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.
An example boolean property might be:
public boolean isMarsupial();
public void setMarsupial(boolean m);

8.3.3 Indexed properties
If we find a property whose type is an array "<PropertyElement>[]", then we
also look for
methods of the form:
public < PropertyElement> get< PropertyName>(int a);
public void set< PropertyName>(int a, < PropertyElement> b);
If we find either kind of pattern then we assume that "<propertyName>" is an
indexed property
and that these methods can be used to read and/or write an indexed value.
Thus an indexed property "foo" might be represented by four accessor

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message