public class MappedPropertyDescriptor extends java.beans.PropertyDescriptor
where getProperty(String key)
and
setProperty(String key, Object value)
,
Property
must be replaced
by the name of the property.
PropertyDescriptor
Constructor and Description |
---|
MappedPropertyDescriptor(java.lang.String propertyName,
java.lang.Class beanClass)
Constructs a MappedPropertyDescriptor for a property that follows
the standard Java convention by having getFoo and setFoo
accessor methods, with the addition of a String parameter (the key).
|
MappedPropertyDescriptor(java.lang.String propertyName,
java.lang.Class beanClass,
java.lang.String mappedGetterName,
java.lang.String mappedSetterName)
This constructor takes the name of a mapped property, and method
names for reading and writing the property.
|
MappedPropertyDescriptor(java.lang.String propertyName,
java.lang.reflect.Method mappedGetter,
java.lang.reflect.Method mappedSetter)
This constructor takes the name of a mapped property, and Method
objects for reading and writing the property.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getMappedPropertyType()
Gets the Class object for the property values.
|
java.lang.reflect.Method |
getMappedReadMethod()
Gets the method that should be used to read one of the property value.
|
java.lang.reflect.Method |
getMappedWriteMethod()
Gets the method that should be used to write one of the property value.
|
void |
setMappedReadMethod(java.lang.reflect.Method mappedGetter)
Sets the method that should be used to read one of the property value.
|
void |
setMappedWriteMethod(java.lang.reflect.Method mappedSetter)
Sets the method that should be used to write the property value.
|
createPropertyEditor, equals, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
public MappedPropertyDescriptor(java.lang.String propertyName, java.lang.Class beanClass) throws java.beans.IntrospectionException
propertyName
- The programmatic name of the property.beanClass
- The Class object for the target bean. For
example sun.beans.OurButton.class.java.beans.IntrospectionException
- if an exception occurs during
introspection.public MappedPropertyDescriptor(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String mappedGetterName, java.lang.String mappedSetterName) throws java.beans.IntrospectionException
propertyName
- The programmatic name of the property.beanClass
- The Class object for the target bean. For
example sun.beans.OurButton.class.mappedGetterName
- The name of the method used for
reading one of the property values. May be null if the
property is write-only.mappedSetterName
- The name of the method used for writing
one of the property values. May be null if the property is
read-only.java.beans.IntrospectionException
- if an exception occurs during
introspection.public MappedPropertyDescriptor(java.lang.String propertyName, java.lang.reflect.Method mappedGetter, java.lang.reflect.Method mappedSetter) throws java.beans.IntrospectionException
propertyName
- The programmatic name of the property.mappedGetter
- The method used for reading one of
the property values. May be be null if the property
is write-only.mappedSetter
- The method used for writing one the
property values. May be null if the property is read-only.java.beans.IntrospectionException
- if an exception occurs during
introspection.public java.lang.Class getMappedPropertyType()
This is the type that will be returned by the mappedReadMethod.
public java.lang.reflect.Method getMappedReadMethod()
public void setMappedReadMethod(java.lang.reflect.Method mappedGetter) throws java.beans.IntrospectionException
mappedGetter
- The mapped getter method.java.beans.IntrospectionException
- If an error occurs finding the
mapped propertypublic java.lang.reflect.Method getMappedWriteMethod()
public void setMappedWriteMethod(java.lang.reflect.Method mappedSetter) throws java.beans.IntrospectionException
mappedSetter
- The mapped setter method.java.beans.IntrospectionException
- If an error occurs finding the
mapped propertyCopyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.