Class ClassReflectionUtil


  • public abstract class ClassReflectionUtil
    extends Object
    Class reflection helper methods.
    Author:
    Rein Raudjärv
    • Constructor Detail

      • ClassReflectionUtil

        public ClassReflectionUtil()
    • Method Detail

      • getClassHierarchy

        public static Set<Class<?>> getClassHierarchy​(Class<?> klass)
        Parameters:
        klass - a root class.
        Returns:
        a set containing the given class, the super classes, the interfaces and all the parent interfaces.
      • getClassHierarchies

        public static Set<Class<?>> getClassHierarchies​(Class<?>... classes)
        Parameters:
        classes - root classes.
        Returns:
        a set containing the given classes, the super classes, the interfaces and all the parent interfaces.
      • getClassHierarchies

        public static Set<Class<?>> getClassHierarchies​(Collection<? extends Class<?>> classes)
        Parameters:
        classes - root classes.
        Returns:
        a set containing the given classes, the super classes, the interfaces and all the parent interfaces.
      • getInterfaces

        public static Set<Class<?>> getInterfaces​(Collection<Class<?>> classes)
        Parameters:
        classes - a set of classes.
        Returns:
        a set containing interfaces of each class.