Class PropertyUtils

java.lang.Object
org.apache.commons.beanutils.PropertyUtils

public class PropertyUtils extends Object

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.

Version:
$Id$
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static int
    Deprecated.
    The debug static property is no longer used
    static final char
    Deprecated.
    The notation used for property name expressions is now dependant on the Resolver implementation being used.
    static final char
    Deprecated.
    The notation used for property name expressions is now dependant on the Resolver implementation being used.
    static final char
    Deprecated.
    The notation used for property name expressions is now dependant on the Resolver implementation being used.
    static final char
    Deprecated.
    The notation used for property name expressions is now dependant on the Resolver implementation being used.
    static final char
    Deprecated.
    The notation used for property name expressions is now dependant on the Resolver implementation being used.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Adds a BeanIntrospector.
    static void
    Clear any cached property descriptors information for all classes loaded by any class loaders.
    static void
    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).
    static Map<String,Object>
    Return the entire set of properties for which the specified bean provides a read method.
    static int
    Deprecated.
    The debug static property is no longer used
    static Object
    Return the value of the specified indexed property of the specified bean, with no type conversions.
    static Object
    getIndexedProperty(Object bean, String name, int index)
    Return the value of the specified indexed property of the specified bean, with no type conversions.
    static Object
    Return the value of the specified mapped property of the specified bean, with no type conversions.
    static Object
    Return the value of the specified mapped property of the specified bean, with no type conversions.
    static org.apache.commons.collections.FastHashMap
    Deprecated.
    This method should not be exposed
    static org.apache.commons.collections.FastHashMap
    Deprecated.
    This method should not be exposed
    static Object
    Return the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
    static Object
    getProperty(Object bean, String name)
    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 null if there is no such descriptor.
    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.
    static Class<?>
    Return the Java Class repesenting the property editor class that has been registered for this property (if any).
    static Class<?>
    Return the Java Class representing the property type of the specified property, or null if there is no such property for the specified bean.
    static Method
    Return an accessible property getter method for this property, if there is one; otherwise return null.
    static Object
    Return the value of the specified simple property of the specified bean, with no type conversions.
    static Method
    Return an accessible property setter method for this property, if there is one; otherwise return null.
    static boolean
    isReadable(Object bean, String name)
    Return true if the specified property name identifies a readable property on the specified bean; otherwise, return false.
    static boolean
    isWriteable(Object bean, String name)
    Return true if the specified property name identifies a writeable property on the specified bean; otherwise, return false.
    static boolean
    Removes the specified BeanIntrospector.
    static void
    Resets the registered BeanIntrospector objects to the initial default state.
    static void
    setDebug(int newDebug)
    Deprecated.
    The debug static property is no longer used
    static void
    setIndexedProperty(Object bean, String name, int index, Object value)
    Sets the value of the specified indexed property of the specified bean, with no type conversions.
    static void
    setIndexedProperty(Object bean, String name, Object value)
    Sets the value of the specified indexed property of the specified bean, with no type conversions.
    static void
    setMappedProperty(Object bean, String name, Object value)
    Sets the value of the specified mapped property of the specified bean, with no type conversions.
    static void
    setMappedProperty(Object bean, String name, String key, Object value)
    Sets the value of the specified mapped property of the specified bean, with no type conversions.
    static void
    setNestedProperty(Object bean, String name, Object value)
    Sets the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions.
    static void
    setProperty(Object bean, String name, Object value)
    Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
    static void
    setSimpleProperty(Object bean, String name, Object value)
    Set the value of the specified simple property of the specified bean, with no type conversions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait