public static boolean hasSuperclass ( Class < ? > clazz , String superClassName ) { List < Type > hierarchy = new ArrayList <> ( ) ; getTypeHierarchy ( hierarchy , clazz , Object . class ) ; for ( Type t : hierarchy ) { if ( isClassType ( t ) && typeToClass ( t ) . getName ( ) . equals ( superClassName ) ) { return true ; } } return false ; }
Returns true if the given class has a superclass of given name .