Class Introspection
java.lang.Object
org.assertj.core.util.introspection.Introspection
Utility methods related to JavaBeans Introspection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Method
findGetter
(String propertyName, Object target) private static Method
findMethod
(String name, Object target) static Method
getPropertyGetter
(String propertyName, Object target) Returns the getterMethod
for a property matching the given name in the given object.private static String
propertyNotFoundErrorMessage
(String propertyName, Object target)
-
Constructor Details
-
Introspection
private Introspection()
-
-
Method Details
-
getPropertyGetter
Returns the getterMethod
for a property matching the given name in the given object.- Parameters:
propertyName
- the given property name.target
- the given object.- Returns:
- the getter
Method
for 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 the getter for the matching property cannot be found or accessed.
-
propertyNotFoundErrorMessage
-
findGetter
-
findMethod
-