📄 propertyutils.java
字号:
return (PropertyUtilsBean.getInstance().getMappedProperty(bean, name));
}
/**
* <p>Return the value of the specified mapped property of the specified
* bean, with no type conversions.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @param bean Bean whose property is to be extracted
* @param name Mapped property name of the property value to be extracted
* @param key Key of the property value to be extracted
* @return the mapped property value
*
* @exception IllegalAccessException if the caller does not have
* access to the property accessor method
* @exception InvocationTargetException if the property accessor method
* throws an exception
* @exception NoSuchMethodException if an accessor method for this
* propety cannot be found
* @see PropertyUtilsBean#getMappedProperty(Object,String, String)
*/
public static Object getMappedProperty(Object bean,
String name, String key)
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException {
return PropertyUtilsBean.getInstance().getMappedProperty(bean, name, key);
}
/**
* <p>Return the mapped property descriptors for this bean class.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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);
}
/**
* <p>Return the mapped property descriptors for this bean.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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);
}
/**
* <p>Return the value of the (possibly nested) property of the specified
* name, for the specified bean, with no type conversions.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @param bean Bean whose property is to be extracted
* @param name Possibly nested name of the property to be extracted
* @return the nested 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 NestedNullException 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#getNestedProperty
*/
public static Object getNestedProperty(Object bean, String name)
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException {
return PropertyUtilsBean.getInstance().getNestedProperty(bean, name);
}
/**
* <p>Return the value of the specified property of the specified bean,
* no matter which property reference format is used, with no
* type conversions.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @param bean Bean whose property is to be extracted
* @param name Possibly indexed and/or nested 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 InvocationTargetException if the property accessor method
* throws an exception
* @exception NoSuchMethodException if an accessor method for this
* propety cannot be found
* @see PropertyUtilsBean#getProperty
*/
public static Object getProperty(Object bean, String name)
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException {
return (PropertyUtilsBean.getInstance().getProperty(bean, name));
}
/**
* <p>Retrieve the property descriptor for the specified property of the
* specified bean, or return <code>null</code> if there is no such
* descriptor.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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 descriptor
*
* @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#getPropertyDescriptor
*/
public static PropertyDescriptor getPropertyDescriptor(Object bean,
String name)
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException {
return PropertyUtilsBean.getInstance().getPropertyDescriptor(bean, name);
}
/**
* <p>Retrieve the property descriptors for the specified class,
* introspecting and caching them the first time a particular bean class
* is encountered.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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);
}
/**
* <p>Retrieve the property descriptors for the specified bean,
* introspecting and caching them the first time a particular bean class
* is encountered.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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);
}
/**
* <p>Return the Java Class repesenting the property editor class that has
* been registered for this property (if any).</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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);
}
/**
* <p>Return the Java Class representing the property type of the specified
* property, or <code>null</code> if there is no such property for the
* specified bean.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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 type
*
* @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#getPropertyType(Object, String)
*/
public static Class getPropertyType(Object bean, String name)
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException {
return PropertyUtilsBean.getInstance().getPropertyType(bean, name);
}
/**
* <p>Return an accessible property getter method for this property,
* if there is one; otherwise return <code>null</code>.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @param descriptor Property descriptor to return a getter for
* @return The read method
* @see PropertyUtilsBean#getReadMethod
*/
public static Method getReadMethod(PropertyDescriptor descriptor) {
return (PropertyUtilsBean.getInstance().getReadMethod(descriptor));
}
/**
* <p>Return the value of the specified simple property of the specified
* bean, with no type conversions.</p>
*
* <p>For more details see <code>PropertyUtilsBean</code>.</p>
*
* @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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -