public final class Introspection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static boolean |
bareNamePropertyMethods |
Modifier | Constructor and Description |
---|---|
private |
Introspection() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canIntrospectExtractBareNamePropertyMethods() |
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 getter
Method for a property matching the given name in the given object. |
private static boolean |
isValidGetter(java.lang.reflect.Method method) |
private static java.lang.String |
propertyNotFoundErrorMessage(java.lang.String propertyName,
java.lang.Object target) |
static void |
setExtractBareNamePropertyMethods(boolean barenamePropertyMethods) |
public static java.lang.reflect.Method getPropertyGetter(java.lang.String propertyName, java.lang.Object target)
Method
for a property matching the given name in the given object.propertyName
- the given property name.target
- the given object.Method
for a property matching the given name in the given object.java.lang.NullPointerException
- if the given property name is null
.java.lang.IllegalArgumentException
- if the given property name is empty.java.lang.NullPointerException
- if the given object is null
.IntrospectionError
- if the getter for the matching property cannot be found or accessed.public static void setExtractBareNamePropertyMethods(boolean barenamePropertyMethods)
public static boolean canIntrospectExtractBareNamePropertyMethods()
private static java.lang.String propertyNotFoundErrorMessage(java.lang.String propertyName, java.lang.Object target)
private static java.lang.reflect.Method findGetter(java.lang.String propertyName, java.lang.Object target)
private static boolean isValidGetter(java.lang.reflect.Method method)
private static java.lang.reflect.Method findMethod(java.lang.String name, java.lang.Object target)