code: public boolean isAssignableFrom(Class cl)
    {
      if (getName().equals(cl.getName()))
        return true;
  
      Class []ifc = cl.getInterfaces();
  
      for (int i = 0; i < ifc.length; i++) {
        if (isAssignableFrom(ifc[i]))
          return true;
      }
  
      if (cl.getSuperclass() != null)
        return isAssignableFrom(cl.getSuperclass());
      else
        return false;
    }
docs: Returns true if the class is assignable from the argument.