java.beans
Class IndexedPropertyDescriptor

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.beans.FeatureDescriptor sample code for java.beans.FeatureDescriptor definition code for java.beans.FeatureDescriptor 
      extended by java.beans.PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor 
          extended by java.beans.IndexedPropertyDescriptor

public class IndexedPropertyDescriptor
extends PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor

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
IndexedPropertyDescriptor sample code for java.beans.IndexedPropertyDescriptor.IndexedPropertyDescriptor(java.lang.String, java.lang.Class) definition code for java.beans.IndexedPropertyDescriptor.IndexedPropertyDescriptor(java.lang.String, java.lang.Class) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Class sample code for java.lang.Class definition code for java.lang.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.
IndexedPropertyDescriptor sample code for java.beans.IndexedPropertyDescriptor.IndexedPropertyDescriptor(java.lang.String, java.lang.Class, java.lang.String, java.lang.String, java.lang.String, java.lang.String) definition code for java.beans.IndexedPropertyDescriptor.IndexedPropertyDescriptor(java.lang.String, java.lang.Class, java.lang.String, java.lang.String, java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Class sample code for java.lang.Class definition code for java.lang.Class <?> beanClass, String sample code for java.lang.String definition code for java.lang.String  readMethodName, String sample code for java.lang.String definition code for java.lang.String  writeMethodName, String sample code for java.lang.String definition code for java.lang.String  indexedReadMethodName, String sample code for java.lang.String definition code for java.lang.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.
IndexedPropertyDescriptor sample code for java.beans.IndexedPropertyDescriptor.IndexedPropertyDescriptor(java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method) definition code for java.beans.IndexedPropertyDescriptor.IndexedPropertyDescriptor(java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  readMethod, Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  writeMethod, Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  indexedReadMethod, Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  indexedWriteMethod)
          This constructor takes the name of a simple property, and Method objects for reading and writing the property.
 
Method Summary
 boolean equals sample code for java.beans.IndexedPropertyDescriptor.equals(java.lang.Object) definition code for java.beans.IndexedPropertyDescriptor.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares this PropertyDescriptor against the specified object.
 Class sample code for java.lang.Class definition code for java.lang.Class <?> getIndexedPropertyType sample code for java.beans.IndexedPropertyDescriptor.getIndexedPropertyType() definition code for java.beans.IndexedPropertyDescriptor.getIndexedPropertyType() ()
          Gets the Class object of the indexed properties' type.
 Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method getIndexedReadMethod sample code for java.beans.IndexedPropertyDescriptor.getIndexedReadMethod() definition code for java.beans.IndexedPropertyDescriptor.getIndexedReadMethod() ()
          Gets the method that should be used to read an indexed property value.
 Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method getIndexedWriteMethod sample code for java.beans.IndexedPropertyDescriptor.getIndexedWriteMethod() definition code for java.beans.IndexedPropertyDescriptor.getIndexedWriteMethod() ()
          Gets the method that should be used to write an indexed property value.
 int hashCode sample code for java.beans.IndexedPropertyDescriptor.hashCode() definition code for java.beans.IndexedPropertyDescriptor.hashCode() ()
          Returns a hash code value for the object.
 void setIndexedReadMethod sample code for java.beans.IndexedPropertyDescriptor.setIndexedReadMethod(java.lang.reflect.Method) definition code for java.beans.IndexedPropertyDescriptor.setIndexedReadMethod(java.lang.reflect.Method) (Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  readMethod)
          Sets the method that should be used to read an indexed property value.
 void setIndexedWriteMethod sample code for java.beans.IndexedPropertyDescriptor.setIndexedWriteMethod(java.lang.reflect.Method) definition code for java.beans.IndexedPropertyDescriptor.setIndexedWriteMethod(java.lang.reflect.Method) (Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  writeMethod)
          Sets the method that should be used to write an indexed property value.
 
Methods inherited from class java.beans.PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor
createPropertyEditor sample code for java.beans.PropertyDescriptor.createPropertyEditor(java.lang.Object) definition code for java.beans.PropertyDescriptor.createPropertyEditor(java.lang.Object) , getPropertyEditorClass sample code for java.beans.PropertyDescriptor.getPropertyEditorClass() definition code for java.beans.PropertyDescriptor.getPropertyEditorClass() , getPropertyType sample code for java.beans.PropertyDescriptor.getPropertyType() definition code for java.beans.PropertyDescriptor.getPropertyType() , getReadMethod sample code for java.beans.PropertyDescriptor.getReadMethod() definition code for java.beans.PropertyDescriptor.getReadMethod() , getWriteMethod sample code for java.beans.PropertyDescriptor.getWriteMethod() definition code for java.beans.PropertyDescriptor.getWriteMethod() , isBound sample code for java.beans.PropertyDescriptor.isBound() definition code for java.beans.PropertyDescriptor.isBound() , isConstrained sample code for java.beans.PropertyDescriptor.isConstrained() definition code for java.beans.PropertyDescriptor.isConstrained() , setBound sample code for java.beans.PropertyDescriptor.setBound(boolean) definition code for java.beans.PropertyDescriptor.setBound(boolean) , setConstrained sample code for java.beans.PropertyDescriptor.setConstrained(boolean) definition code for java.beans.PropertyDescriptor.setConstrained(boolean) , setPropertyEditorClass sample code for java.beans.PropertyDescriptor.setPropertyEditorClass(java.lang.Class) definition code for java.beans.PropertyDescriptor.setPropertyEditorClass(java.lang.Class) , setReadMethod sample code for java.beans.PropertyDescriptor.setReadMethod(java.lang.reflect.Method) definition code for java.beans.PropertyDescriptor.setReadMethod(java.lang.reflect.Method) , setWriteMethod sample code for java.beans.PropertyDescriptor.setWriteMethod(java.lang.reflect.Method) definition code for java.beans.PropertyDescriptor.setWriteMethod(java.lang.reflect.Method)
 
Methods inherited from class java.beans.FeatureDescriptor sample code for java.beans.FeatureDescriptor definition code for java.beans.FeatureDescriptor
attributeNames sample code for java.beans.FeatureDescriptor.attributeNames() definition code for java.beans.FeatureDescriptor.attributeNames() , getDisplayName sample code for java.beans.FeatureDescriptor.getDisplayName() definition code for java.beans.FeatureDescriptor.getDisplayName() , getName sample code for java.beans.FeatureDescriptor.getName() definition code for java.beans.FeatureDescriptor.getName() , getShortDescription sample code for java.beans.FeatureDescriptor.getShortDescription() definition code for java.beans.FeatureDescriptor.getShortDescription() , getValue sample code for java.beans.FeatureDescriptor.getValue(java.lang.String) definition code for java.beans.FeatureDescriptor.getValue(java.lang.String) , isExpert sample code for java.beans.FeatureDescriptor.isExpert() definition code for java.beans.FeatureDescriptor.isExpert() , isHidden sample code for java.beans.FeatureDescriptor.isHidden() definition code for java.beans.FeatureDescriptor.isHidden() , isPreferred sample code for java.beans.FeatureDescriptor.isPreferred() definition code for java.beans.FeatureDescriptor.isPreferred() , setDisplayName sample code for java.beans.FeatureDescriptor.setDisplayName(java.lang.String) definition code for java.beans.FeatureDescriptor.setDisplayName(java.lang.String) , setExpert sample code for java.beans.FeatureDescriptor.setExpert(boolean) definition code for java.beans.FeatureDescriptor.setExpert(boolean) , setHidden sample code for java.beans.FeatureDescriptor.setHidden(boolean) definition code for java.beans.FeatureDescriptor.setHidden(boolean) , setName sample code for java.beans.FeatureDescriptor.setName(java.lang.String) definition code for java.beans.FeatureDescriptor.setName(java.lang.String) , setPreferred sample code for java.beans.FeatureDescriptor.setPreferred(boolean) definition code for java.beans.FeatureDescriptor.setPreferred(boolean) , setShortDescription sample code for java.beans.FeatureDescriptor.setShortDescription(java.lang.String) definition code for java.beans.FeatureDescriptor.setShortDescription(java.lang.String) , setValue sample code for java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object) definition code for java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

IndexedPropertyDescriptor sample code for java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.Class<?>) definition code for java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.Class<?>)

public IndexedPropertyDescriptor(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                 Class sample code for java.lang.Class definition code for java.lang.Class <?> beanClass)
                          throws IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException 
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.
beanClass - The Class object for the target bean.
Throws:
IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException - if an exception occurs during introspection.

IndexedPropertyDescriptor sample code for java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.Class<?>, java.lang.String, java.lang.String, java.lang.String, java.lang.String) definition code for java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.Class<?>, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

public IndexedPropertyDescriptor(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                 Class sample code for java.lang.Class definition code for java.lang.Class <?> beanClass,
                                 String sample code for java.lang.String definition code for java.lang.String  readMethodName,
                                 String sample code for java.lang.String definition code for java.lang.String  writeMethodName,
                                 String sample code for java.lang.String definition code for java.lang.String  indexedReadMethodName,
                                 String sample code for java.lang.String definition code for java.lang.String  indexedWriteMethodName)
                          throws IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException 
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.
beanClass - The Class object for the target bean.
readMethodName - The name of the method used for reading the property values as an array. May be null if the property is write-only or must be indexed.
writeMethodName - The name of the method used for writing the property values as an array. May be null if the property is read-only or must be indexed.
indexedReadMethodName - The name of the method used for reading an indexed property value. May be null if the property is write-only.
indexedWriteMethodName - The name of the method used for writing an indexed property value. May be null if the property is read-only.
Throws:
IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException - if an exception occurs during introspection.

IndexedPropertyDescriptor sample code for java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method) definition code for java.beans.IndexedPropertyDescriptor(java.lang.String, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method, java.lang.reflect.Method)

public IndexedPropertyDescriptor(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                 Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  readMethod,
                                 Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  writeMethod,
                                 Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  indexedReadMethod,
                                 Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  indexedWriteMethod)
                          throws IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException 
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 pro perty.
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.
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.
indexedReadMethod - The method used for reading an indexed property value. May be null if the property is write-only.
indexedWriteMethod - The method used for writing an indexed property value. May be null if the property is read-only.
Throws:
IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException - if an exception occurs during introspection.
Method Detail

getIndexedReadMethod sample code for java.beans.IndexedPropertyDescriptor.getIndexedReadMethod() definition code for java.beans.IndexedPropertyDescriptor.getIndexedReadMethod()

public Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  getIndexedReadMethod()
Gets the method that should be used to read an indexed property value.

Returns:
The method that should be used to read an indexed property value. May return null if the property isn't indexed or is write-only.

setIndexedReadMethod sample code for java.beans.IndexedPropertyDescriptor.setIndexedReadMethod(java.lang.reflect.Method) definition code for java.beans.IndexedPropertyDescriptor.setIndexedReadMethod(java.lang.reflect.Method)

public void setIndexedReadMethod(Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  readMethod)
                          throws IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException 
Sets the method that should be used to read an indexed property value.

Parameters:
readMethod - The new indexed read method.
Throws:
IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException

getIndexedWriteMethod sample code for java.beans.IndexedPropertyDescriptor.getIndexedWriteMethod() definition code for java.beans.IndexedPropertyDescriptor.getIndexedWriteMethod()

public Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  getIndexedWriteMethod()
Gets the method that should be used to write an indexed property value.

Returns:
The method that should be used to write an indexed property value. May return null if the property isn't indexed or is read-only.

setIndexedWriteMethod sample code for java.beans.IndexedPropertyDescriptor.setIndexedWriteMethod(java.lang.reflect.Method) definition code for java.beans.IndexedPropertyDescriptor.setIndexedWriteMethod(java.lang.reflect.Method)

public void setIndexedWriteMethod(Method sample code for java.lang.reflect.Method definition code for java.lang.reflect.Method  writeMethod)
                           throws IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException 
Sets the method that should be used to write an indexed property value.

Parameters:
writeMethod - The new indexed write method.
Throws:
IntrospectionException sample code for java.beans.IntrospectionException definition code for java.beans.IntrospectionException

getIndexedPropertyType sample code for java.beans.IndexedPropertyDescriptor.getIndexedPropertyType() definition code for java.beans.IndexedPropertyDescriptor.getIndexedPropertyType()

public Class sample code for java.lang.Class definition code for java.lang.Class <?> getIndexedPropertyType()
Gets the Class object of the indexed properties' type. The returned Class may describe a primitive type such as int.

Returns:
The Class for the indexed properties' type; may return null if the type cannot be determined.

equals sample code for java.beans.IndexedPropertyDescriptor.equals(java.lang.Object) definition code for java.beans.IndexedPropertyDescriptor.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares this PropertyDescriptor against the specified object. Returns true if the objects are the same. Two PropertyDescriptors are the same if the read, write, property types, property editor and flags are equivalent.

Overrides:
equals sample code for java.beans.PropertyDescriptor.equals(java.lang.Object) definition code for java.beans.PropertyDescriptor.equals(java.lang.Object) in class PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
Since:
1.4
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for java.beans.IndexedPropertyDescriptor.hashCode() definition code for java.beans.IndexedPropertyDescriptor.hashCode()

public int hashCode()
Returns a hash code value for the object. See Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() for a complete description.

Overrides:
hashCode sample code for java.beans.PropertyDescriptor.hashCode() definition code for java.beans.PropertyDescriptor.hashCode() in class PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor
Returns:
a hash code value for this object.
Since:
1.5
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable