public class ReflectionUtil extends Object
| Constructor and Description |
|---|
ReflectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static LinkedHashSet<Method> |
getDeclaredMethods(Class<?> theClazz) |
static Class<?> |
getGenericCollectionTypeOfField(Field next) |
static Class<?> |
getGenericCollectionTypeOfFieldWithSecondOrderForList(Field next)
For a field of type List
|
static Class<?> |
getGenericCollectionTypeOfMethodParameter(Method theMethod,
int theParamIndex) |
static Class<?> |
getGenericCollectionTypeOfMethodReturnType(Method theMethod) |
static boolean |
isInstantiable(Class<?> theType) |
static <T> T |
newInstance(Class<T> theType)
Instantiate a class by no-arg constructor, throw
ConfigurationException if we fail to do so |
static <T> T |
newInstanceOrReturnNull(String theClassName,
Class<T> theType) |
public ReflectionUtil()
public static LinkedHashSet<Method> getDeclaredMethods(Class<?> theClazz)
public static Class<?> getGenericCollectionTypeOfField(Field next)
public static Class<?> getGenericCollectionTypeOfFieldWithSecondOrderForList(Field next)
public static Class<?> getGenericCollectionTypeOfMethodParameter(Method theMethod, int theParamIndex)
public static Class<?> getGenericCollectionTypeOfMethodReturnType(Method theMethod)
public static <T> T newInstance(Class<T> theType)
ConfigurationException if we fail to do sopublic static <T> T newInstanceOrReturnNull(String theClassName, Class<T> theType)
public static boolean isInstantiable(Class<?> theType)
Copyright © 2014–2017 University Health Network. All rights reserved.