code: public DeclaredType findSupertype(TypeMirror type, String qualifiedName) {
      TypeElement element = asTypeElement(type);
      if (element != null && element.getQualifiedName().toString().equals(qualifiedName)) {
        return (DeclaredType) type;
      }
      for (TypeMirror t : directSupertypes(type)) {
        DeclaredType result = findSupertype(t, qualifiedName);
        if (result != null) {
          return result;
        }
      }
      return null;
    }
docs: Find a supertype matching the given qualified name.