Class ReflectionUtil


  • @Internal
    public final class ReflectionUtil
    extends Object
    Utility for reflection operations on classes and generic type parametrization.
    • Method Detail

      • newInstance

        public static <T> T newInstance​(Class<T> clazz)
      • getTemplateType

        public static <T> Class<T> getTemplateType​(Class<?> clazz,
                                                   int num)
      • getTemplateType

        public static <T> Class<T> getTemplateType​(Class<?> clazz,
                                                   Class<?> classWithParameter,
                                                   int num)
      • getTemplateType1

        public static <T> Class<T> getTemplateType1​(Class<?> clazz)
      • getTemplateType1

        public static <T> Class<T> getTemplateType1​(Type type)
      • getTemplateType2

        public static <T> Class<T> getTemplateType2​(Class<?> clazz)
      • getTemplateType3

        public static <T> Class<T> getTemplateType3​(Class<?> clazz)
      • getTemplateType4

        public static <T> Class<T> getTemplateType4​(Class<?> clazz)
      • getTemplateType5

        public static <T> Class<T> getTemplateType5​(Class<?> clazz)
      • getTemplateType6

        public static <T> Class<T> getTemplateType6​(Class<?> clazz)
      • getTemplateType7

        public static <T> Class<T> getTemplateType7​(Class<?> clazz)
      • getTemplateType8

        public static <T> Class<T> getTemplateType8​(Class<?> clazz)
      • getSuperTemplateTypes

        public static Class<?>[] getSuperTemplateTypes​(Class<?> clazz)
      • getSuperTemplateTypes

        public static Class<?>[] getSuperTemplateTypes​(Class<?> clazz,
                                                       Class<?> searchedSuperClass)
      • getTemplateTypes

        public static Class<?>[] getTemplateTypes​(Class<?> clazz)
      • getFullTemplateType

        public static ReflectionUtil.FullTypeInfo getFullTemplateType​(Type type,
                                                                      int templatePosition)
        Extract the full template type information from the given type's template parameter at the given position.
        Parameters:
        type - type to extract the full template parameter information from
        templatePosition - describing at which position the template type parameter is
        Returns:
        Full type information describing the template parameter's type
      • getFullTemplateType

        public static ReflectionUtil.FullTypeInfo getFullTemplateType​(Type type)
        Extract the full type information from the given type.
        Parameters:
        type - to be analyzed
        Returns:
        Full type information describing the given type