public static boolean isSubclassOf ( ClassNode classNode , String parentClassName ) { ClassNode currentSuper = classNode . getSuperClass ( ) ; while ( currentSuper != null && ! currentSuper . getName ( ) . equals ( OBJECT_CLASS ) ) { if ( currentSuper . getName ( ) . equals ( parentClassName ) ) return true ; currentSuper = currentSuper . getSuperClass ( ) ; } return false ; }
Returns true if the given class name is a parent class of the given class