private static @NotNull Map<PsiElement, ModShowConflicts.Conflict> getConflicts(@NotNull PsiClass anInterface,
                                                                                  @NotNull Collection<PsiClass> inheritors) {
    final Map<PsiElement, ModShowConflicts.Conflict> conflicts = new HashMap<>();
    inheritors.forEach(aClass -> {
      if (aClass.isEnum() || aClass.isRecord() || aClass.isInterface()) {
        final ModShowConflicts.Conflict conflict = new ModShowConflicts.Conflict(List.of(IntentionPowerPackBundle.message(
          "0.implementing.1.will.not.compile.after.converting.1.to.a.class",
          RefactoringUIUtil.getDescription(aClass, true),
          RefactoringUIUtil.getDescription(anInterface, false))));
        conflicts.put(aClass, conflict);
        return;
      }
      final PsiReferenceList extendsList = aClass.getExtendsList();
      if (extendsList == null) {
        return;
      }
      final PsiJavaCodeReferenceElement[] referenceElements = extendsList.getReferenceElements();
      if (referenceElements.length > 0) {
        final PsiElement target = referenceElements[0].resolve();
        if (target instanceof PsiClass targetClass && !CommonClassNames.JAVA_LANG_OBJECT.equals(targetClass.getQualifiedName())) {
          final ModShowConflicts.Conflict conflict = new ModShowConflicts.Conflict(List.of(IntentionPowerPackBundle.message(
            "0.already.extends.1.and.will.not.compile.after.converting.2.to.a.class",
            RefactoringUIUtil.getDescription(aClass, true),
            RefactoringUIUtil.getDescription(target, true),
            RefactoringUIUtil.getDescription(anInterface, false))));
          conflicts.put(aClass, conflict);
        }
      }
    });

    final PsiFunctionalExpression functionalExpression =
      FunctionalExpressionSearch.search(anInterface, anInterface.getUseScope()).findFirst();
    if (functionalExpression != null) {
      final ModShowConflicts.Conflict conflict = new ModShowConflicts.Conflict(List.of(IntentionPowerPackBundle.message(
        "0.will.not.compile.after.converting.1.to.a.class",
        ClassPresentationUtil.getFunctionalExpressionPresentation(functionalExpression, true),
        RefactoringUIUtil.getDescription(anInterface, false))));
      conflicts.put(functionalExpression, conflict);
    }
    Comparator<PsiElement> comparator = Comparator.comparing(
      (PsiElement e) -> e.getContainingFile().getVirtualFile().getPath()).thenComparing(PsiElementOrderComparator.getInstance());
    return EntryStream.of(conflicts).sorted(Map.Entry.comparingByKey(comparator)).toCustomMap(LinkedHashMap::new);
  }
private static @NotNull Map<PsiElement, ModShowConflicts.Conflict> getConflicts(@NotNull PsiClass anInterface,
                                                                                  @NotNull Collection<PsiClass> inheritors)