public static boolean isHierarchyResolved(@NotNull PsiClass psiClass) {
    Set<PsiClass> processed = new HashSet<>();
    Deque<PsiClass> stack = new ArrayDeque<>();
    stack.push(psiClass);
    while (!stack.isEmpty()) {
      PsiClass currentClass = stack.pop();
      if (!processed.add(currentClass)) continue;
      for (PsiClassType type : currentClass.getSuperTypes()) {
        PsiClass resolved = type.resolve();
        if (resolved == null) return false;
        stack.push(resolved);
      }
    }
    return true;
  }
public static boolean isHierarchyResolved(@NotNull PsiClass psiClass)