Class Reflections


  • public abstract class Reflections
    extends Object
    This class is a helper class to do some reflection stuff.
    Author:
    Markus von RĂ¼den
    • Constructor Detail

      • Reflections

        public Reflections()
    • Method Detail

      • buildClassHierarchy

        public static List<Class<?>> buildClassHierarchy​(Class<?> clazz)
        Gets a list of all parent interfaces and classes implemented/inherit by clazz.

        Example:
           class A implements Serializable, Clonable {
           ....
           }
         
           class B extends A implements Comparable {
            ....
           }
         
           class C extends B {
         
            ....
         
           }
         
           buildClassHierarchy(c.class) returns [C.class, Comparable.class, B.class, Serializable.class, Cloneable.class, A.class]
         
        Parameters:
        clazz -
        Returns: