public static boolean isSubTypeOf ( String parent , String child ) { try { return isSubTypeOf ( Class . forName ( parent ) , Class . forName ( child ) ) ; } catch ( ClassNotFoundException e ) { // Exception noted so can be ignored. e = null ; return false ; } }
Checks that the named child class is the same type or a sub - type of the named parent class .