Class ClassUtil


  • public abstract class ClassUtil
    extends Object
    • Constructor Detail

      • ClassUtil

        public ClassUtil()
    • Method Detail

      • getParameterizedTypes

        public static Type[] getParameterizedTypes​(Class<?> target)
      • getGenericType

        public static Type[] getGenericType​(Class<?> target)
      • isClass

        public static boolean isClass​(String _className)
      • getClass

        public static Class<?> getClass​(String _className)
        get class from class name
        Parameters:
        _className -
        Returns:
        class
      • getSuperClass

        public Class<?> getSuperClass​(Class<?> _class)
        get supper class of current class
        Parameters:
        _className -
        Returns:
        class
      • getSuperInterface

        public Class<?> getSuperInterface​(Class<?> _class)
        get supper interface of current class
        Parameters:
        _className -
        Returns:
        class
      • getAllSuperInterface

        public static List<Class<?>> getAllSuperInterface​(Class<?> _class)
        get all interface of current class
        Parameters:
        _className -
        Returns:
        list
      • getAllSuperClass

        public static List<Class<?>> getAllSuperClass​(Class<?> _class)
        get all supper class of current class
        Parameters:
        _class -
        Returns:
        list
      • isContainInterface

        public static boolean isContainInterface​(Class<?> _class,
                                                 Class<?> _interface)
        check interface is exist or not in current class
        Parameters:
        _clazz -
        Returns:
        list
      • collectionParamType

        public static Class<?> collectionParamType​(Field _field)
      • collectionParamType

        public static Class<?> collectionParamType​(Method _field)
      • getCollectionType

        public static Class<?> getCollectionType​(Collection<?> _collection)
      • isArrayField

        public static boolean isArrayField​(Field _field)
      • isCollection

        public static boolean isCollection​(Class<?> _class)
      • getAllRelField

        public static List<Field> getAllRelField​(Class<?> _class)
      • main

        public static void main​(String[] args)