| |
|
| java.lang.Object java.beans.FeatureDescriptor java.beans.PropertyDescriptor java.beans.IndexedPropertyDescriptor
IndexedPropertyDescriptor | public class IndexedPropertyDescriptor extends PropertyDescriptor (Code) | | An IndexedPropertyDescriptor describes a property that acts like an
array and has an indexed read and/or indexed write method to access
specific elements of the array.
An indexed property may also provide simple non-indexed read and write
methods. If these are present, they read and write arrays of the type
returned by the indexed read method.
|
Constructor Summary | |
public | IndexedPropertyDescriptor(String propertyName, Class> beanClass) This constructor constructs an IndexedPropertyDescriptor for a property
that follows the standard Java conventions by having getFoo and setFoo
accessor methods, for both indexed access and array access. | public | IndexedPropertyDescriptor(String propertyName, Class> beanClass, String readMethodName, String writeMethodName, String indexedReadMethodName, String indexedWriteMethodName) This constructor takes the name of a simple property, and method
names for reading and writing the property, both indexed
and non-indexed.
Parameters: propertyName - The programmatic name of the property. Parameters: beanClass - The Class object for the target bean. Parameters: readMethodName - The name of the method used for reading the propertyvalues as an array. | public | IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod, Method indexedReadMethod, Method indexedWriteMethod) This constructor takes the name of a simple property, and Method
objects for reading and writing the property.
Parameters: propertyName - The programmatic name of the property. Parameters: readMethod - The method used for reading the property values as an array.May be null if the property is write-only or must be indexed. Parameters: writeMethod - The method used for writing the property values as an array.May be null if the property is read-only or must be indexed. Parameters: indexedReadMethod - The method used for reading an indexed property value.May be null if the property is write-only. Parameters: indexedWriteMethod - The method used for writing an indexed property value. | | IndexedPropertyDescriptor(Class> bean, String base, Method read, Method write, Method readIndexed, Method writeIndexed) Creates PropertyDescriptor for the specified bean
with the specified name and methods to read/write the property value. | | IndexedPropertyDescriptor(PropertyDescriptor x, PropertyDescriptor y) Package-private constructor.
Merge two property descriptors. | | IndexedPropertyDescriptor(IndexedPropertyDescriptor old) |
Method Summary | |
public boolean | equals(Object obj) Compares this PropertyDescriptor against the specified object.
Returns true if the objects are the same. | public synchronized Class> | getIndexedPropertyType() Gets the Class object of the indexed properties' type. | public synchronized Method | getIndexedReadMethod() Gets the method that should be used to read an indexed
property value. | public synchronized Method | getIndexedWriteMethod() Gets the method that should be used to write an indexed property value. | public int | hashCode() Returns a hash code value for the object. | public synchronized void | setIndexedReadMethod(Method readMethod) Sets the method that should be used to read an indexed property value. | public synchronized void | setIndexedWriteMethod(Method writeMethod) Sets the method that should be used to write an indexed property value. |
IndexedPropertyDescriptor | public IndexedPropertyDescriptor(String propertyName, Class> beanClass) throws IntrospectionException(Code) | | This constructor constructs an IndexedPropertyDescriptor for a property
that follows the standard Java conventions by having getFoo and setFoo
accessor methods, for both indexed access and array access.
Thus if the argument name is "fred", it will assume that there
is an indexed reader method "getFred", a non-indexed (array) reader
method also called "getFred", an indexed writer method "setFred",
and finally a non-indexed writer method "setFred".
Parameters: propertyName - The programmatic name of the property. Parameters: beanClass - The Class object for the target bean. exception: IntrospectionException - if an exception occurs duringintrospection. |
IndexedPropertyDescriptor | public IndexedPropertyDescriptor(String propertyName, Class> beanClass, String readMethodName, String writeMethodName, String indexedReadMethodName, String indexedWriteMethodName) throws IntrospectionException(Code) | | This constructor takes the name of a simple property, and method
names for reading and writing the property, both indexed
and non-indexed.
Parameters: propertyName - The programmatic name of the property. Parameters: beanClass - The Class object for the target bean. Parameters: readMethodName - The name of the method used for reading the propertyvalues as an array. May be null if the property is write-onlyor must be indexed. Parameters: writeMethodName - The name of the method used for writing the propertyvalues as an array. May be null if the property is read-onlyor must be indexed. Parameters: indexedReadMethodName - The name of the method used for readingan indexed property value.May be null if the property is write-only. Parameters: indexedWriteMethodName - The name of the method used for writingan indexed property value. May be null if the property is read-only. exception: IntrospectionException - if an exception occurs duringintrospection. |
IndexedPropertyDescriptor | public IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod, Method indexedReadMethod, Method indexedWriteMethod) throws IntrospectionException(Code) | | This constructor takes the name of a simple property, and Method
objects for reading and writing the property.
Parameters: propertyName - The programmatic name of the property. Parameters: readMethod - The method used for reading the property values as an array.May be null if the property is write-only or must be indexed. Parameters: writeMethod - The method used for writing the property values as an array.May be null if the property is read-only or must be indexed. Parameters: indexedReadMethod - The method used for reading an indexed property value.May be null if the property is write-only. Parameters: indexedWriteMethod - The method used for writing an indexed property value. May be null if the property is read-only. exception: IntrospectionException - if an exception occurs duringintrospection. |
IndexedPropertyDescriptor | IndexedPropertyDescriptor(Class> bean, String base, Method read, Method write, Method readIndexed, Method writeIndexed) throws IntrospectionException(Code) | | Creates PropertyDescriptor for the specified bean
with the specified name and methods to read/write the property value.
Parameters: bean - the type of the target bean Parameters: base - the base name of the property (the rest of the method name) Parameters: read - the method used for reading the property value Parameters: write - the method used for writing the property value Parameters: readIndexed - the method used for reading an indexed property value Parameters: writeIndexed - the method used for writing an indexed property value exception: IntrospectionException - if an exception occurs during introspection since: 1.7 |
IndexedPropertyDescriptor | IndexedPropertyDescriptor(PropertyDescriptor x, PropertyDescriptor y)(Code) | | Package-private constructor.
Merge two property descriptors. Where they conflict, give the
second argument (y) priority over the first argumnnt (x).
Parameters: x - The first (lower priority) PropertyDescriptor Parameters: y - The second (higher priority) PropertyDescriptor |
equals | public boolean equals(Object obj)(Code) | | Compares this PropertyDescriptor against the specified object.
Returns true if the objects are the same. Two PropertyDescriptor s
are the same if the read, write, property types, property editor and
flags are equivalent.
since: 1.4 |
getIndexedPropertyType | public synchronized Class> getIndexedPropertyType()(Code) | | Gets the Class object of the indexed properties' type.
The returned Class may describe a primitive type such as int .
The Class for the indexed properties' type; may return null if the type cannot be determined. |
getIndexedReadMethod | public synchronized Method getIndexedReadMethod()(Code) | | Gets the method that should be used to read an indexed
property value.
The method that should be used to read an indexedproperty value.May return null if the property isn't indexed or is write-only. |
getIndexedWriteMethod | public synchronized Method getIndexedWriteMethod()(Code) | | Gets the method that should be used to write an indexed property value.
The method that should be used to write an indexedproperty value.May return null if the property isn't indexed or is read-only. |
hashCode | public int hashCode()(Code) | | Returns a hash code value for the object.
See
java.lang.Object.hashCode for a complete description.
a hash code value for this object. since: 1.5 |
setIndexedReadMethod | public synchronized void setIndexedReadMethod(Method readMethod) throws IntrospectionException(Code) | | Sets the method that should be used to read an indexed property value.
Parameters: readMethod - The new indexed read method. |
setIndexedWriteMethod | public synchronized void setIndexedWriteMethod(Method writeMethod) throws IntrospectionException(Code) | | Sets the method that should be used to write an indexed property value.
Parameters: writeMethod - The new indexed write method. |
|
|
|