public class ClassUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassUtils.PropertyInfo
workaround for JVM BUG - http://codereligion.com/post/28703017143/beware-of-java-beans-introspector
|
| Constructor and Description |
|---|
ClassUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ClassUtils.PropertyInfo[] |
extractBeanPropertiesInfo(Type type)
workaround for JVM BUG - http://codereligion.com/post/28703017143/beware-of-java-beans-introspector
|
static <T> T |
findAnnotation(Annotation[] searchList,
Class<T> annotation) |
static Type |
getActualValueOfTypeVariable(Class<?> clazz,
TypeVariable<?> typeVariable) |
static Class<?> |
getBoxedClassForPrimitive(Class<?> primitiveType) |
static Type |
getCollectionBaseType(Class<?> type,
Type genericType) |
static Type |
getGenericReturnTypeOfGenericInterfaceMethod(Class<?> clazz,
Method method) |
static String |
getGetterMethod(String propertyName) |
static String |
getGetterMethod(String propertyName,
Class<?> baseClass) |
static List<Method> |
getGetterMethods(Class<?> objectType) |
static String |
getMethodDescription(Method method) |
static String |
getPropertyForGetterOrSetterMethod(Method method) |
static Class<?> |
getRawType(Type type) |
static String |
getSetterMethod(String propertyName) |
static List<Method> |
getSetterMethods(Class<?> objectType) |
static boolean |
hasCharacterConstructor(Class<?> rawType) |
static boolean |
hasCharacterConstructor(Type type) |
static boolean |
hasMethod(Class<?> baseType,
String methodName) |
static boolean |
hasMethod(Class<?> baseType,
String methodName,
Class<?>[] parameters) |
static boolean |
hasStringConstructor(Class<?> rawType) |
static boolean |
hasStringConstructor(Type type) |
static boolean |
hasValidSetter(Class<?> widgetType,
String setterMethod,
Class<?> attrType) |
static boolean |
isAnnotationPresent(Class<?> targetClass,
Class<? extends Annotation> annotationClass) |
static boolean |
isCollection(Class<?> type) |
static boolean |
isPropertyVisibleToWrite(Class<?> type,
Field field) |
static boolean |
isSimpleType(Class<?> rawType) |
static boolean |
isSimpleType(Type type) |
static boolean |
isValidGetterMethod(Method method) |
static boolean |
isValidSetterMethod(Method method) |
static Type |
resolveGenericTypeOnMethod(Type genericParameterType,
Class<?> baseClass,
Method method) |
static Object |
stringToPrimitiveBoxType(Class<?> primitiveType,
String value) |
public static boolean hasCharacterConstructor(Class<?> rawType)
rawType - public static boolean hasCharacterConstructor(Type type)
type - public static boolean hasStringConstructor(Class<?> rawType)
rawType - public static boolean hasStringConstructor(Type type)
type - public static boolean isAnnotationPresent(Class<?> targetClass, Class<? extends Annotation> annotationClass)
public static boolean isSimpleType(Class<?> rawType)
type - public static boolean isSimpleType(Type type)
type - public static Type getGenericReturnTypeOfGenericInterfaceMethod(Class<?> clazz, Method method)
public static String getSetterMethod(String propertyName)
propertyName - public static String getGetterMethod(String propertyName, Class<?> baseClass)
propertyName - baseClass - public static String getGetterMethod(String propertyName)
propertyName - public static boolean hasMethod(Class<?> baseType, String methodName)
baseType - methodName - public static boolean hasMethod(Class<?> baseType, String methodName, Class<?>[] parameters)
baseType - methodName - parameters - public static boolean hasValidSetter(Class<?> widgetType, String setterMethod, Class<?> attrType)
widgetType - setterMethod - public static boolean isValidSetterMethod(Method method)
public static boolean isValidGetterMethod(Method method)
method - public static List<Method> getGetterMethods(Class<?> objectType)
objectType - public static String getPropertyForGetterOrSetterMethod(Method method)
public static ClassUtils.PropertyInfo[] extractBeanPropertiesInfo(Type type)
type - public static Type resolveGenericTypeOnMethod(Type genericParameterType, Class<?> baseClass, Method method)
public static Class<?> getBoxedClassForPrimitive(Class<?> primitiveType)
primitiveType - public static String getMethodDescription(Method method)
method - public static boolean isPropertyVisibleToWrite(Class<?> type, Field field)
type - field - public static Object stringToPrimitiveBoxType(Class<?> primitiveType, String value)
public static boolean isCollection(Class<?> type)
public static <T> T findAnnotation(Annotation[] searchList, Class<T> annotation)
public static Type getActualValueOfTypeVariable(Class<?> clazz, TypeVariable<?> typeVariable)
Copyright © 2016. All rights reserved.