Class BeanPropertyReaderUtil
java.lang.Object
de.knightsoftnet.validators.shared.util.BeanPropertyReaderUtil
Bean Property Util, read bean property.
- Author:
- Manfred Tremmel
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetNullSaveProperty(Object pbean, String pname) Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String.static StringgetNullSaveStringProperty(Object pbean, String pname) Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String.
-
Method Details
-
getNullSaveStringProperty
public static String getNullSaveStringProperty(Object pbean, String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String.
If there is a null value in path hierarchy, exception is cached and null returned.
- Parameters:
pbean- Bean whose property is to be extractedpname- Possibly indexed and/or nested name of the property to be extracted- Returns:
- The property's value, converted to a String
- Throws:
IllegalAccessException- if the caller does not have access to the property accessor methodInvocationTargetException- if the property accessor method throws an exceptionNoSuchMethodException- if an accessor method for this property cannot be found- See Also:
-
BeanUtilsBean.getProperty(java.lang.Object, java.lang.String)
-
getNullSaveProperty
public static Object getNullSaveProperty(Object pbean, String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String.
If there is a null value in path hierarchy, exception is cached and null returned.
- Parameters:
pbean- Bean whose property is to be extractedpname- Possibly indexed and/or nested name of the property to be extracted- Returns:
- The property's value, converted to a String
- Throws:
IllegalAccessException- if the caller does not have access to the property accessor methodInvocationTargetException- if the property accessor method throws an exceptionNoSuchMethodException- if an accessor method for this property cannot be found- See Also:
-
BeanUtilsBean.getProperty(java.lang.Object, java.lang.String)
-