public class MappedPropertyDescriptor
extends com.googlecode.openbeans.PropertyDescriptor
getProperty(String key) and
setProperty(String key, Object value),
where Property must be replaced
by the name of the property.
PropertyDescriptor| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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, setWriteMethodpublic MappedPropertyDescriptor(java.lang.String propertyName,
java.lang.Class<?> beanClass)
throws com.googlecode.openbeans.IntrospectionException
propertyName - The programmatic name of the property.beanClass - The Class object for the target bean. For
example sun.beans.OurButton.class.com.googlecode.openbeans.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 com.googlecode.openbeans.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.com.googlecode.openbeans.IntrospectionException - if an exception occurs during
introspection.public MappedPropertyDescriptor(java.lang.String propertyName,
java.lang.reflect.Method mappedGetter,
java.lang.reflect.Method mappedSetter)
throws com.googlecode.openbeans.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.com.googlecode.openbeans.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 com.googlecode.openbeans.IntrospectionException
mappedGetter - The mapped getter method.com.googlecode.openbeans.IntrospectionException - If an error occurs finding the
mapped propertypublic java.lang.reflect.Method getMappedWriteMethod()
public void setMappedWriteMethod(java.lang.reflect.Method mappedSetter)
throws com.googlecode.openbeans.IntrospectionException
mappedSetter - The mapped setter method.com.googlecode.openbeans.IntrospectionException - If an error occurs finding the
mapped propertyCopyright © 2023. All Rights Reserved.