/** * Set the value of the specified simple property of the specified bean, with no type conversions. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean whose property is to be modified * @param name Name of the property to be modified * @param value Value to which the property should be set * @exception IllegalAccessException if the caller does not have access to the property accessor * method * @exception IllegalArgumentException if <code>bean</code> or <code>name</code> is null * @exception IllegalArgumentException if the property name is nested or indexed * @exception InvocationTargetException if the property accessor method throws an exception * @exception NoSuchMethodException if an accessor method for this propety cannot be found * @see PropertyUtilsBean#setSimpleProperty */ public static void setSimpleProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setSimpleProperty(bean, name, value); }
/** * Return an accessible property setter method for this property, if there is one; otherwise * return <code>null</code>. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param descriptor Property descriptor to return a setter for * @return The write method * @see PropertyUtilsBean#getWriteMethod(PropertyDescriptor) */ public static Method getWriteMethod(PropertyDescriptor descriptor) { return PropertyUtilsBean.getInstance().getWriteMethod(descriptor); }
/** * Return <code>true</code> if the specified property name identifies a writeable property on the * specified bean; otherwise, return <code>false</code>. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean to be examined (may be a {@link DynaBean} * @param name Property name to be evaluated * @return <code>true</code> if the property is writeable, otherwise <code>false</code> * @exception IllegalArgumentException if <code>bean</code> or <code>name</code> is <code>null * </code> * @see PropertyUtilsBean#isWriteable * @since BeanUtils 1.6 */ public static boolean isWriteable(Object bean, String name) { return PropertyUtilsBean.getInstance().isWriteable(bean, name); }
/** * Return an accessible property getter method for this property, if there is one; otherwise * return <code>null</code>. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param descriptor Property descriptor to return a getter for * @return The read method * @see PropertyUtilsBean#getReadMethod(PropertyDescriptor) */ public static Method getReadMethod(PropertyDescriptor descriptor) { return (PropertyUtilsBean.getInstance().getReadMethod(descriptor)); }
/** * Return the value of the specified simple property of the specified bean, with no type * conversions. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean whose property is to be extracted * @param name Name of the property to be extracted * @return The property value * @exception IllegalAccessException if the caller does not have access to the property accessor * method * @exception IllegalArgumentException if <code>bean</code> or <code>name</code> is null * @exception IllegalArgumentException if the property name is nested or indexed * @exception InvocationTargetException if the property accessor method throws an exception * @exception NoSuchMethodException if an accessor method for this propety cannot be found * @see PropertyUtilsBean#getSimpleProperty */ public static Object getSimpleProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return PropertyUtilsBean.getInstance().getSimpleProperty(bean, name); }
/** * Retrieve the property descriptors for the specified bean, introspecting and caching them the * first time a particular bean class is encountered. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean for which property descriptors are requested * @return the property descriptors * @exception IllegalArgumentException if <code>bean</code> is null * @see PropertyUtilsBean#getPropertyDescriptors(Object) */ public static PropertyDescriptor[] getPropertyDescriptors(Object bean) { return PropertyUtilsBean.getInstance().getPropertyDescriptors(bean); }
/** * Return the Java Class repesenting the property editor class that has been registered for this * property (if any). * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean for which a property descriptor is requested * @param name Possibly indexed and/or nested name of the property for which a property descriptor * is requested * @return the property editor class * @exception IllegalAccessException if the caller does not have access to the property accessor * method * @exception IllegalArgumentException if <code>bean</code> or <code>name</code> is null * @exception IllegalArgumentException if a nested reference to a property returns null * @exception InvocationTargetException if the property accessor method throws an exception * @exception NoSuchMethodException if an accessor method for this propety cannot be found * @see PropertyUtilsBean#getPropertyEditorClass(Object,String) */ public static Class getPropertyEditorClass(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return PropertyUtilsBean.getInstance().getPropertyEditorClass(bean, name); }
/** * Return the mapped property descriptors for this bean. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean to be introspected * @return the mapped property descriptors * @see PropertyUtilsBean#getMappedPropertyDescriptors(Object) * @deprecated This method should not be exposed */ public static FastHashMap getMappedPropertyDescriptors(Object bean) { return PropertyUtilsBean.getInstance().getMappedPropertyDescriptors(bean); }
/** * Retrieve the property descriptors for the specified class, introspecting and caching them the * first time a particular bean class is encountered. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param beanClass Bean class for which property descriptors are requested * @return the property descriptors * @exception IllegalArgumentException if <code>beanClass</code> is null * @see PropertyUtilsBean#getPropertyDescriptors(Class) */ public static PropertyDescriptor[] getPropertyDescriptors(Class beanClass) { return PropertyUtilsBean.getInstance().getPropertyDescriptors(beanClass); }
/** * Return the mapped property descriptors for this bean class. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param beanClass Bean class to be introspected * @return the mapped property descriptors * @see PropertyUtilsBean#getMappedPropertyDescriptors(Class) * @deprecated This method should not be exposed */ public static FastHashMap getMappedPropertyDescriptors(Class beanClass) { return PropertyUtilsBean.getInstance().getMappedPropertyDescriptors(beanClass); }
/** * Return the value of the specified indexed property of the specified bean, with no type * conversions. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean whose property is to be extracted * @param name Simple property name of the property value to be extracted * @param index Index of the property value to be extracted * @return the indexed property value * @exception IndexOutOfBoundsException if the specified index is outside the valid range for the * underlying property * @exception IllegalAccessException if the caller does not have access to the property accessor * method * @exception IllegalArgumentException if <code>bean</code> or <code>name</code> is null * @exception InvocationTargetException if the property accessor method throws an exception * @exception NoSuchMethodException if an accessor method for this propety cannot be found * @see PropertyUtilsBean#getIndexedProperty(Object,String, int) */ public static Object getIndexedProperty(Object bean, String name, int index) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return (PropertyUtilsBean.getInstance().getIndexedProperty(bean, name, index)); }
/** * Return the entire set of properties for which the specified bean provides a read method. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param bean Bean whose properties are to be extracted * @return The set of properties for the bean * @exception IllegalAccessException if the caller does not have access to the property accessor * method * @exception IllegalArgumentException if <code>bean</code> is null * @exception InvocationTargetException if the property accessor method throws an exception * @exception NoSuchMethodException if an accessor method for this propety cannot be found * @see PropertyUtilsBean#describe */ public static Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return (PropertyUtilsBean.getInstance().describe(bean)); }
/** * 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 <code>BeanInfo</code> classes). * * <p>For more details see <code>PropertyUtilsBean</code>. * * @param dest Destination bean whose properties are modified * @param orig Origin bean whose properties are retrieved * @exception IllegalAccessException if the caller does not have access to the property accessor * method * @exception IllegalArgumentException if the <code>dest</code> or <code>orig</code> argument is * null * @exception InvocationTargetException if the property accessor method throws an exception * @exception NoSuchMethodException if an accessor method for this propety cannot be found * @see PropertyUtilsBean#copyProperties */ public static void copyProperties(Object dest, Object orig) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().copyProperties(dest, orig); }
/** * 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. * * <p>For more details see <code>PropertyUtilsBean</code>. * * @see PropertyUtilsBean#clearDescriptors */ public static void clearDescriptors() { PropertyUtilsBean.getInstance().clearDescriptors(); }