is new.
java.lang.Objectjava.beans.FeatureDescriptor
java.beans.PropertyDescriptor
A PropertyDescriptor describes one property that a Java Bean exports via a pair of accessor methods.
| Constructor Summary | |
|---|---|
|
PropertyDescriptor
(
String
propertyName,
Class
beanClass) Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods. |
|
PropertyDescriptor
(
String
propertyName,
Class
beanClass,
String
readMethodName,
This constructor takes the name of a simple property, and method names for reading and writing the property. |
|
PropertyDescriptor
(
String
propertyName,
Method
readMethod,
This constructor takes the name of a simple property, and Method objects for reading and writing the property. |
|
| Method Summary | |
|---|---|
PropertyEditor
|
createPropertyEditor
(
Object
Constructs an instance of a property editor using the current property editor class.
|
| boolean |
equals
(
Object
obj) Compares this PropertyDescriptor against the specified object. |
| Class |
getPropertyEditorClass
() Gets any explicit PropertyEditor Class that has been registered for this property. |
| Class |
getPropertyType
() Gets the Class object for the property. |
| Method |
getReadMethod
() Gets the method that should be used to read the property value. |
| Method |
getWriteMethod
() Gets the method that should be used to write the property value. |
int
|
hashCode
()
Returns a hash code value for the object.
|
| boolean |
isBound
() Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed. |
| boolean |
isConstrained
() Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed. |
| void |
setBound
(boolean bound) Updates to "bound" properties will cause a "PropertyChange" event to get fired when the property is changed. |
| void |
setConstrained
(boolean constrained) Attempted updates to "Constrained" properties will cause a "VetoableChange" event to get fired when the property is changed. |
| void |
setPropertyEditorClass
(
Class
propertyEditorClass) Normally PropertyEditors will be found using the PropertyEditorManager. |
| void |
setReadMethod
(
Method
Sets the method that should be used to read the property value. |
| void |
setWriteMethod
(
Method
Sets the method that should be used to write the property value. |
| Methods inherited from class java.beans. FeatureDescriptor |
|---|
| attributeNames , getDisplayName , getName , getShortDescription , getValue , isExpert , isHidden , isPreferred , setDisplayName , setExpert , setHidden , setName , setPreferred , setShortDescription , setValue |
| Methods inherited from class java.lang. Object |
|---|
clone
,
finalize
,
getClass
,
|
| Constructor Detail |
|---|
public PropertyDescriptor(String propertyName,
Class beanClass)
throws IntrospectionException
public PropertyDescriptor(String propertyName,
Class beanClass,
String
readMethodName,

getterName,
String
writeMethodName)

setterName)
throws IntrospectionException
readMethodName
writeMethodName
public PropertyDescriptor(String propertyName,
Method
readMethod,

getter,
Method
writeMethod)

setter)
throws IntrospectionException
readMethod
writeMethod
| Method Detail |
|---|
public Class getPropertyType()
This is the type that will be returned by the ReadMethod.
public Method getReadMethod()
public void setReadMethod(MethodreadMethod)
getter)throws IntrospectionException
readMethod
read
public Method getWriteMethod()
public void setWriteMethod(MethodwriteMethod)
setter)throws IntrospectionException
writeMethod
write
public boolean isBound()
public void setBound(boolean bound)
public boolean isConstrained()
public void setConstrained(boolean constrained)
public void setPropertyEditorClass(Class propertyEditorClass)
public Class getPropertyEditorClass()
createPropertyEditor
public
PropertyEditor
createPropertyEditor
(
Object
bean)
Constructs an instance of a property editor using the current property editor class.
If the property editor class has a public constructor that takes an Object argument then it will be invoked using the bean parameter as the argument. Otherwise, the default constructor will be invoked.
Parameters:
bean - the source object
Returns:
a property editor instance or null if a property editor has not been defined or cannot be created
Since:
1.5
public boolean equals(Object obj)
hashCode
public int
hashCode
()
Returns a hash code value for the object. See
Object.hashCode()
for a complete description.
Overrides:
hashCode
in class
Object
Returns:
a hash code value for this object.
Since:
1.5
See Also:
Object.equals(java.lang.Object)
,
Hashtable