static HighlightInfo.Builder checkOverrideEquivalentInheritedMethods(@NotNull PsiClass aClass,
                                                               @NotNull PsiFile containingFile,
                                                               @NotNull LanguageLevel languageLevel) {
    Collection<HierarchicalMethodSignature> visibleSignatures = aClass.getVisibleSignatures();
    if (aClass.getImplementsListTypes().length == 0 && aClass.getExtendsListTypes().length == 0) {
      // optimization: do not analyze unrelated methods from Object: in case of no inheritance they can't conflict
      return null;
    }
    PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(aClass.getProject()).getResolveHelper();

    String description = null;
    boolean appendImplementMethodFix = true;
    Ultimate:
    for (HierarchicalMethodSignature signature : visibleSignatures) {
      PsiMethod method = signature.getMethod();
      if (!resolveHelper.isAccessible(method, aClass, null)) continue;
      List<HierarchicalMethodSignature> superSignatures = signature.getSuperSignatures();

      boolean allAbstracts = method.hasModifierProperty(PsiModifier.ABSTRACT);
      PsiClass containingClass = method.getContainingClass();
      if (containingClass == null || aClass.equals(containingClass)) continue; //to be checked at method level

      if (aClass.isInterface() && !containingClass.isInterface()) continue;
      String error;
      if (allAbstracts) {
        superSignatures = new ArrayList<>(superSignatures);
        superSignatures.add(0, signature);
        error = checkInterfaceInheritedMethodsReturnTypesDescription(superSignatures, languageLevel);
      }
      else {
        Ref<String> descriptionH = new Ref<>();
        checkMethodIncompatibleReturnType(signature, superSignatures, false, descriptionH);
        error = descriptionH.get();
      }
      if (error != null) {
        description = error;
      }

      if (method.hasModifierProperty(PsiModifier.STATIC) &&
          //jsl 8, chapter 9.4.1
          //chapter 8.4.8.2 speaks about a class that "declares or inherits a static method",
          // at the same time the rule from chapter 9.4.1 speaks only about an interface that "declares a static method"
          //There is no point to add java version check, because static methods in interfaces are allowed from java 8 too.
          (!aClass.isInterface() ||
           aClass.getManager().areElementsEquivalent(aClass, method.getContainingClass()))) {
        for (HierarchicalMethodSignature superSignature : superSignatures) {
          PsiMethod superMethod = superSignature.getMethod();
          if (!superMethod.hasModifierProperty(PsiModifier.STATIC)) {
            PsiClass superClass = superMethod.getContainingClass();
            description = JavaErrorBundle.message("static.method.cannot.override.instance.method",
                                                  JavaHighlightUtil.formatMethod(method),
                                                  HighlightUtil.formatClass(containingClass),
                                                  JavaHighlightUtil.formatMethod(superMethod),
                                                    superClass != null ? HighlightUtil.formatClass(superClass) : "<unknown>");
            appendImplementMethodFix = false;
            break Ultimate;
          }
        }
        continue;
      }

      if (description == null) {
        Ref<@Nls String> descriptionH = new Ref<>();
        checkMethodIncompatibleThrows(signature, superSignatures, false, aClass, descriptionH);
        description = descriptionH.get();
      }

      if (description == null) {
        Ref<@Nls String> descriptionH = new Ref<>();
        checkMethodWeakerPrivileges(signature, superSignatures, false, containingFile, descriptionH);
        description = descriptionH.get();
      }

      if (description != null) break;
    }


    if (description != null) {
      // show error info at the class level
      TextRange textRange = HighlightNamesUtil.getClassDeclarationTextRange(aClass);
      HighlightInfo.Builder highlightInfo = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(textRange).descriptionAndTooltip(description);
      if (appendImplementMethodFix) {
        IntentionAction action = QuickFixFactory.getInstance().createImplementMethodsFix(aClass);
        highlightInfo.registerFix(action, null, null, null, null);
      }
      return highlightInfo;
    }
    return null;
  }
static HighlightInfo.Builder checkOverrideEquivalentInheritedMethods(@NotNull PsiClass aClass,
                                                               @NotNull PsiFile containingFile,
                                                               @NotNull LanguageLevel languageLevel)