private static List < Class < ? > > getClassHierarchy ( Class < ? > clazz ) { List < Class < ? > > hierarchy = new ArrayList < Class < ? > > ( 4 ) ; for ( Class < ? > current = clazz ; current != null ; current = current . getSuperclass ( ) ) { hierarchy . add ( current ) ; } return hierarchy ; }
Returns the class hierarchy of the given type from bottom to top starting with the given class itself . Interfaces are not included .