public final class ReflectionHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertGetterMethod(Method getterMethod,
Class<? extends Annotation> annotationClass) |
static void |
assertReadMethod(Method readMethod,
Class<? extends Annotation> annotationClass) |
static Field |
getField(Class<?> containingClass,
String fieldName) |
static Method |
getGetterMethod(Class<?> containingClass,
String propertyName) |
static String |
getGetterPropertyName(Member member)
Returns the JavaBeans property name of the given member.
|
static Method |
getSetterMethod(Class<?> containingClass,
Class<?> propertyType,
String propertyName) |
static Method |
getSetterMethod(Class<?> containingClass,
String propertyName) |
static boolean |
hasField(Class<?> containingClass,
String fieldName) |
static boolean |
hasGetterMethod(Class<?> containingClass,
String propertyName) |
static boolean |
isGetterMethod(Method method)
Checks whether the given method is a valid getter method according to the JavaBeans standard.
|
static boolean |
isList(Type type) |
static boolean |
isMap(Type type) |
static boolean |
isMethodOverwritten(Method parentMethod,
Class<?> childClass) |
static List<Object> |
transformArrayToList(Object arrayObject) |
public static String getGetterPropertyName(Member member)
member
- never nullpublic static boolean isGetterMethod(Method method)
method
- never nullpublic static boolean hasGetterMethod(Class<?> containingClass, String propertyName)
containingClass
- never nullpropertyName
- never nullpublic static Method getGetterMethod(Class<?> containingClass, String propertyName)
containingClass
- never nullpropertyName
- never nullpublic static boolean hasField(Class<?> containingClass, String fieldName)
containingClass
- never nullfieldName
- never nullpublic static Field getField(Class<?> containingClass, String fieldName)
containingClass
- never nullfieldName
- never nullpublic static Method getSetterMethod(Class<?> containingClass, Class<?> propertyType, String propertyName)
containingClass
- never nullpropertyType
- never nullpropertyName
- never nullpublic static Method getSetterMethod(Class<?> containingClass, String propertyName)
containingClass
- never nullpropertyName
- never nullpublic static boolean isMethodOverwritten(Method parentMethod, Class<?> childClass)
public static void assertGetterMethod(Method getterMethod, Class<? extends Annotation> annotationClass)
public static void assertReadMethod(Method readMethod, Class<? extends Annotation> annotationClass)
public static boolean isMap(Type type)
type
- never nullMap
public static boolean isList(Type type)
type
- never nullList
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.