Package org.fest.util
Class Introspection
java.lang.Object
org.fest.util.Introspection
Utility methods related to JavaBeans Introspection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static MethodfindGetter(String propertyName, Object target) private static MethodfindMethod(String name, Object target) static PropertyDescriptorgetProperty(String propertyName, Object target) Returns aPropertyDescriptorfor a property matching the given name in the given object.private static StringpropertyNotFoundErrorMessage(String propertyName, Object target)
-
Constructor Details
-
Introspection
private Introspection()
-
-
Method Details
-
getProperty
Returns aPropertyDescriptorfor a property matching the given name in the given object.- Parameters:
propertyName- the given property name.target- the given object.- Returns:
- a
PropertyDescriptorfor a property matching the given name in the given object. - Throws:
NullPointerException- if the given property name isnull.IllegalArgumentException- if the given property name is empty.NullPointerException- if the given object isnull.IntrospectionError- if a matching property cannot be found or accessed.
-
propertyNotFoundErrorMessage
-
findGetter
-
findMethod
-