java.lang.Object | |
↳ | org.apache.commons.beanutils.PropertyUtils |
Utility methods for using Java Reflection APIs to facilitate generic property getter and setter operations on Java objects.
The implementations for these methods are provided by PropertyUtilsBean
.
For more details see PropertyUtilsBean
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
char | INDEXED_DELIM |
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
|
|||||||||
char | INDEXED_DELIM2 |
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
|
|||||||||
char | MAPPED_DELIM |
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
|
|||||||||
char | MAPPED_DELIM2 |
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
|
|||||||||
char | NESTED_DELIM |
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clear any cached property descriptors information for all classes
loaded by any class loaders.
| |||||||||||
Copy property values from the "origin" bean to the "destination" bean
for all cases where the property names are the same (even though the
actual getter and setter methods might have been customized via
| |||||||||||
Return the entire set of properties for which the specified bean provides a read method. | |||||||||||
This method is deprecated.
The
debug static property is no longer used
| |||||||||||
Return the value of the specified indexed property of the specified bean, with no type conversions. | |||||||||||
Return the value of the specified indexed property of the specified bean, with no type conversions. | |||||||||||
Return the value of the specified mapped property of the specified bean, with no type conversions. | |||||||||||
Return the value of the specified mapped property of the specified bean, with no type conversions. | |||||||||||
This method is deprecated.
This method should not be exposed
| |||||||||||
This method is deprecated.
This method should not be exposed
| |||||||||||
Return the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions. | |||||||||||
Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions. | |||||||||||
Retrieve the property descriptor for the specified property of the
specified bean, or return | |||||||||||
Retrieve the property descriptors for the specified class, introspecting and caching them the first time a particular bean class is encountered. | |||||||||||
Retrieve the property descriptors for the specified bean, introspecting and caching them the first time a particular bean class is encountered. | |||||||||||
Return the Java Class repesenting the property editor class that has been registered for this property (if any). | |||||||||||
Return the Java Class representing the property type of the specified
property, or | |||||||||||
Return an accessible property getter method for this property,
if there is one; otherwise return | |||||||||||
Return the value of the specified simple property of the specified bean, with no type conversions. | |||||||||||
Return an accessible property setter method for this property,
if there is one; otherwise return | |||||||||||
Return | |||||||||||
Return | |||||||||||
This method is deprecated.
The
debug static property is no longer used
| |||||||||||
Sets the value of the specified indexed property of the specified bean, with no type conversions. | |||||||||||
Sets the value of the specified indexed property of the specified bean, with no type conversions. | |||||||||||
Sets the value of the specified mapped property of the specified bean, with no type conversions. | |||||||||||
Sets the value of the specified mapped property of the specified bean, with no type conversions. | |||||||||||
Sets the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions. | |||||||||||
Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions. | |||||||||||
Set the value of the specified simple property of the specified bean, with no type conversions. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
The delimiter that preceeds the zero-relative subscript for an indexed reference.
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
The delimiter that follows the zero-relative subscript for an indexed reference.
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
The delimiter that preceeds the key of a mapped property.
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
The delimiter that follows the key of a mapped property.
This constant is deprecated.
The notation used for property name expressions is now
dependant on the Resolver
implementation being used.
The delimiter that separates the components of a nested reference.
Clear any cached property descriptors information for all classes loaded by any class loaders. This is useful in cases where class loaders are thrown away to implement class reloading.
For more details see PropertyUtilsBean
.
Copy property values from the "origin" bean to the "destination" bean
for all cases where the property names are the same (even though the
actual getter and setter methods might have been customized via
BeanInfo
classes).
For more details see PropertyUtilsBean
.
dest | Destination bean whose properties are modified |
---|---|
orig | Origin bean whose properties are retrieved |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if the dest or
orig argument is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the entire set of properties for which the specified bean provides a read method.
For more details see PropertyUtilsBean
.
bean | Bean whose properties are to be extracted |
---|
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
This method is deprecated.
The debug
static property is no longer used
The debug
static property is no longer used
Return the value of the specified indexed property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | propertyname[index] of the property value
to be extracted |
IndexOutOfBoundsException | if the specified index is outside the valid range for the underlying property |
---|---|
IllegalAccessException | if the caller does not have access to the property accessor method |
IllegalArgumentException | if bean or
name is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified indexed property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | Simple property name of the property value to be extracted |
index | Index of the property value to be extracted |
IndexOutOfBoundsException | if the specified index is outside the valid range for the underlying property |
---|---|
IllegalAccessException | if the caller does not have access to the property accessor method |
IllegalArgumentException | if bean or
name is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified mapped property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | Mapped property name of the property value to be extracted |
key | Key of the property value to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified mapped property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | propertyname(key) of the property value
to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
This method is deprecated.
This method should not be exposed
Return the mapped property descriptors for this bean.
For more details see PropertyUtilsBean
.
bean | Bean to be introspected |
---|
This method is deprecated.
This method should not be exposed
Return the mapped property descriptors for this bean class.
For more details see PropertyUtilsBean
.
beanClass | Bean class to be introspected |
---|
Return the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | Possibly nested name of the property to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
NestedNullException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | Possibly indexed and/or nested name of the property to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Retrieve the property descriptor for the specified property of the
specified bean, or return null
if there is no such
descriptor.
For more details see PropertyUtilsBean
.
bean | Bean for which a property descriptor is requested |
---|---|
name | Possibly indexed and/or nested name of the property for which a property descriptor is requested |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
IllegalArgumentException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Retrieve the property descriptors for the specified class, introspecting and caching them the first time a particular bean class is encountered.
For more details see PropertyUtilsBean
.
beanClass | Bean class for which property descriptors are requested |
---|
IllegalArgumentException | if beanClass is null |
---|
Retrieve the property descriptors for the specified bean, introspecting and caching them the first time a particular bean class is encountered.
For more details see PropertyUtilsBean
.
bean | Bean for which property descriptors are requested |
---|
IllegalArgumentException | if bean is null |
---|
Return the Java Class repesenting the property editor class that has been registered for this property (if any).
For more details see PropertyUtilsBean
.
bean | Bean for which a property descriptor is requested |
---|---|
name | Possibly indexed and/or nested name of the property for which a property descriptor is requested |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
IllegalArgumentException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return the Java Class representing the property type of the specified
property, or null
if there is no such property for the
specified bean.
For more details see PropertyUtilsBean
.
bean | Bean for which a property descriptor is requested |
---|---|
name | Possibly indexed and/or nested name of the property for which a property descriptor is requested |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
IllegalArgumentException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return an accessible property getter method for this property,
if there is one; otherwise return null
.
For more details see PropertyUtilsBean
.
descriptor | Property descriptor to return a getter for |
---|
Return the value of the specified simple property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be extracted |
---|---|
name | Name of the property to be extracted |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
IllegalArgumentException | if the property name is nested or indexed |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Return an accessible property setter method for this property,
if there is one; otherwise return null
.
For more details see PropertyUtilsBean
.
descriptor | Property descriptor to return a setter for |
---|
Return true
if the specified property name identifies
a readable property on the specified bean; otherwise, return
false
.
For more details see PropertyUtilsBean
.
bean | Bean to be examined (may be a DynaBean |
---|---|
name | Property name to be evaluated |
true
if the property is readable,
otherwise false
IllegalArgumentException | if bean
or name is null |
---|
Return true
if the specified property name identifies
a writeable property on the specified bean; otherwise, return
false
.
For more details see PropertyUtilsBean
.
bean | Bean to be examined (may be a DynaBean |
---|---|
name | Property name to be evaluated |
true
if the property is writeable,
otherwise false
IllegalArgumentException | if bean
or name is null |
---|
This method is deprecated.
The debug
static property is no longer used
The debug
static property is no longer used
newDebug | debug property |
---|
Sets the value of the specified indexed property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be modified |
---|---|
name | propertyname[index] of the property value
to be modified |
value | Value to which the specified property element should be set |
IndexOutOfBoundsException | if the specified index is outside the valid range for the underlying property |
---|---|
IllegalAccessException | if the caller does not have access to the property accessor method |
IllegalArgumentException | if bean or
name is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Sets the value of the specified indexed property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be set |
---|---|
name | Simple property name of the property value to be set |
index | Index of the property value to be set |
value | Value to which the indexed property element is to be set |
IndexOutOfBoundsException | if the specified index is outside the valid range for the underlying property |
---|---|
IllegalAccessException | if the caller does not have access to the property accessor method |
IllegalArgumentException | if bean or
name is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Sets the value of the specified mapped property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be set |
---|---|
name | Mapped property name of the property value to be set |
key | Key of the property value to be set |
value | The property value to be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Sets the value of the specified mapped property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be set |
---|---|
name | propertyname(key) of the property value
to be set |
value | The property value to be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Sets the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be modified |
---|---|
name | Possibly nested name of the property to be modified |
value | Value to which the property is to be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
IllegalArgumentException | if a nested reference to a property returns null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be modified |
---|---|
name | Possibly indexed and/or nested name of the property to be modified |
value | Value to which this property is to be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |
Set the value of the specified simple property of the specified bean, with no type conversions.
For more details see PropertyUtilsBean
.
bean | Bean whose property is to be modified |
---|---|
name | Name of the property to be modified |
value | Value to which the property should be set |
IllegalAccessException | if the caller does not have access to the property accessor method |
---|---|
IllegalArgumentException | if bean or
name is null |
IllegalArgumentException | if the property name is nested or indexed |
InvocationTargetException | if the property accessor method throws an exception |
NoSuchMethodException | if an accessor method for this propety cannot be found |