Class Introspection
- java.lang.Object
-
- org.assertj.core.util.introspection.Introspection
-
public final class Introspection extends java.lang.Object
Utility methods related to JavaBeans Introspection.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Introspection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.reflect.Method
findGetter(java.lang.String propertyName, java.lang.Object target)
private static java.lang.reflect.Method
findMethod(java.lang.String name, java.lang.Object target)
static java.lang.reflect.Method
getPropertyGetter(java.lang.String propertyName, java.lang.Object target)
Returns the getterMethod
for a property matching the given name in the given object.private static java.lang.String
propertyNotFoundErrorMessage(java.lang.String propertyName, java.lang.Object target)
-
-
-
Method Detail
-
getPropertyGetter
public static java.lang.reflect.Method getPropertyGetter(java.lang.String propertyName, java.lang.Object target)
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:
java.lang.NullPointerException
- if the given property name isnull
.java.lang.IllegalArgumentException
- if the given property name is empty.java.lang.NullPointerException
- if the given object isnull
.IntrospectionError
- if the getter for the matching property cannot be found or accessed.
-
propertyNotFoundErrorMessage
private static java.lang.String propertyNotFoundErrorMessage(java.lang.String propertyName, java.lang.Object target)
-
findGetter
private static java.lang.reflect.Method findGetter(java.lang.String propertyName, java.lang.Object target)
-
findMethod
private static java.lang.reflect.Method findMethod(java.lang.String name, java.lang.Object target)
-
-