Package ca.uhn.fhir.util
Class ReflectionUtil
- java.lang.Object
-
- ca.uhn.fhir.util.ReflectionUtil
-
public class ReflectionUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ReflectionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LinkedHashSet<Method>getDeclaredMethods(Class<?> theClazz)static Class<?>getGenericCollectionTypeOfField(Field next)static Class<?>getGenericCollectionTypeOfFieldWithSecondOrderForList(Field next)For a field of type List>, returns Foo static Class<?>getGenericCollectionTypeOfMethodParameter(Method theMethod, int theParamIndex)static Class<?>getGenericCollectionTypeOfMethodReturnType(Method theMethod)static booleanisInstantiable(Class<?> theType)static <T> TnewInstance(Class<T> theType)Instantiate a class by no-arg constructor, throwConfigurationExceptionif we fail to do sostatic <T> TnewInstance(Class<T> theType, Class<?> theArgumentType, Object theArgument)static <EVS_IN,EVS_OUT,SDT,CST,CDCT,IST>
IContextValidationSupport<EVS_IN,EVS_OUT,SDT,CST,CDCT,IST>newInstanceOfFhirProfileValidationSupport(String theType)static ObjectnewInstanceOfFhirServerType(String theType)static <T> TnewInstanceOrReturnNull(String theClassName, Class<T> theType)
-
-
-
Constructor Detail
-
ReflectionUtil
public ReflectionUtil()
-
-
Method Detail
-
getDeclaredMethods
public static LinkedHashSet<Method> getDeclaredMethods(Class<?> theClazz)
-
getGenericCollectionTypeOfField
public static Class<?> getGenericCollectionTypeOfField(Field next)
-
getGenericCollectionTypeOfFieldWithSecondOrderForList
public static Class<?> getGenericCollectionTypeOfFieldWithSecondOrderForList(Field next)
For a field of type List>, returns Foo
-
getGenericCollectionTypeOfMethodParameter
public static Class<?> getGenericCollectionTypeOfMethodParameter(Method theMethod, int theParamIndex)
-
getGenericCollectionTypeOfMethodReturnType
public static Class<?> getGenericCollectionTypeOfMethodReturnType(Method theMethod)
-
isInstantiable
public static boolean isInstantiable(Class<?> theType)
-
newInstance
public static <T> T newInstance(Class<T> theType)
Instantiate a class by no-arg constructor, throwConfigurationExceptionif we fail to do so
-
newInstance
public static <T> T newInstance(Class<T> theType, Class<?> theArgumentType, Object theArgument)
-
newInstanceOfFhirServerType
public static Object newInstanceOfFhirServerType(String theType)
-
newInstanceOfFhirProfileValidationSupport
public static <EVS_IN,EVS_OUT,SDT,CST,CDCT,IST> IContextValidationSupport<EVS_IN,EVS_OUT,SDT,CST,CDCT,IST> newInstanceOfFhirProfileValidationSupport(String theType)
-
newInstanceOrReturnNull
public static <T> T newInstanceOrReturnNull(String theClassName, Class<T> theType)
-
-