PropertyDescriptor.PropertyDescriptor
Class Overview | Class Members |
This Package |
All Packages
public PropertyDescriptor( String propertyName,
Class beanClass ) throws IntrospectionException
Parameters
- propertyName
- The programmatic name of the property.
- beanClass
- The Class object for the target bean. For
example sun.beans.OurButton.class.
Description
Constructs a PropertyDescriptor for a property that follows
the standard Java convention by having getFoo and setFoo
accessor methods. Thus if the argument name is "fred", it will
assume that the reader method is "getFred" and the writer method
is "setFred". Note that the property name should start with a lower
case character, which will be capitalized in the method names.
Exceptions
IntrospectionException
if an exception occurs during
introspection.
public PropertyDescriptor( String propertyName,
Class beanClass,
String getterName,
String setterName ) throws IntrospectionException
Parameters
- propertyName
- The programmatic name of the property.
- beanClass
- The Class object for the target bean. For
example sun.beans.OurButton.class.
- getterName
- The name of the method used for reading the property
value. May be null if the property is write-only.
- setterName
- The name of the method used for writing the property
value. May be null if the property is read-only.
Description
This constructor takes the name of a simple property, and method
names for reading and writing the property.
Exceptions
IntrospectionException
if an exception occurs during
introspection.
public PropertyDescriptor( String propertyName,
Method getter,
Method setter ) throws IntrospectionException
Parameters
- propertyName
- The programmatic name of the property.
- getter
- The method used for reading the property value.
May be null if the property is write-only.
- setter
- The method used for writing the property value.
May be null if the property is read-only.
Description
This constructor takes the name of a simple property, and Method
objects for reading and writing the property.
Exceptions
IntrospectionException
if an exception occurs during
introspection.