static HighlightInfo.Builder checkMethodCanHaveBody(@NotNull PsiMethod method, @NotNull LanguageLevel languageLevel) {
    PsiClass aClass = method.getContainingClass();
    boolean hasNoBody = method.getBody() == null;
    boolean isInterface = aClass != null && aClass.isInterface();
    boolean isExtension = method.hasModifierProperty(PsiModifier.DEFAULT);
    boolean isStatic = method.hasModifierProperty(PsiModifier.STATIC);
    boolean isPrivate = method.hasModifierProperty(PsiModifier.PRIVATE);
    boolean isConstructor = method.isConstructor();

    List<IntentionAction> additionalFixes = new ArrayList<>();
    String description = null;
    if (hasNoBody) {
      if (isExtension) {
        description = JavaErrorBundle.message("extension.method.should.have.a.body");
      }
      else if (isInterface) {
        if (isStatic && JavaFeature.STATIC_INTERFACE_CALLS.isSufficient(languageLevel)) {
          description = JavaErrorBundle.message("static.methods.in.interfaces.should.have.body");
        }
        else if (isPrivate && JavaFeature.PRIVATE_INTERFACE_METHODS.isSufficient(languageLevel)) {
          description = JavaErrorBundle.message("private.methods.in.interfaces.should.have.body");
        }
      }
      if (description != null) {
        additionalFixes.add(QuickFixFactory.getInstance().createAddMethodBodyFix(method));
      }
    }
    else if (isInterface) {
      if (!isExtension && !isStatic && !isPrivate && !isConstructor) {
        description = JavaErrorBundle.message("interface.methods.cannot.have.body");
        if (JavaFeature.EXTENSION_METHODS.isSufficient(languageLevel)) {
          if (Stream.of(method.findDeepestSuperMethods())
            .map(PsiMethod::getContainingClass)
            .filter(Objects::nonNull)
            .map(PsiClass::getQualifiedName)
            .noneMatch(CommonClassNames.JAVA_LANG_OBJECT::equals)) {
            IntentionAction makeDefaultFix = QuickFixFactory.getInstance().createModifierListFix(method, PsiModifier.DEFAULT, true, false);
            additionalFixes.add(PriorityIntentionActionWrapper.highPriority(makeDefaultFix));
            additionalFixes.add(QuickFixFactory.getInstance().createModifierListFix(method, PsiModifier.STATIC, true, false));
          }
        }
      }
    }
    else if (isExtension) {
      description = JavaErrorBundle.message("extension.method.in.class");
      additionalFixes.add(QuickFixFactory.getInstance().createModifierListFix(method, PsiModifier.DEFAULT, false, false));
    }
    else if (method.hasModifierProperty(PsiModifier.ABSTRACT)) {
      description = JavaErrorBundle.message("abstract.methods.cannot.have.a.body");
    }
    else if (method.hasModifierProperty(PsiModifier.NATIVE)) {
      description = JavaErrorBundle.message("native.methods.cannot.have.a.body");
    }
    if (description == null) return null;

    TextRange textRange = HighlightNamesUtil.getMethodDeclarationTextRange(method);
    HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(textRange).descriptionAndTooltip(description);
    if (method.hasModifierProperty(PsiModifier.ABSTRACT) && !isInterface) {
      IntentionAction action = QuickFixFactory.getInstance().createModifierListFix(method, PsiModifier.ABSTRACT, false, false);
      info.registerFix(action, null, null, null, null);
    }
    for (IntentionAction intentionAction : additionalFixes) {
      info.registerFix(intentionAction, null, null, null, null);
    }
    if (!hasNoBody) {
      if (!isExtension) {
        IntentionAction action = QuickFixFactory.getInstance().createDeleteMethodBodyFix(method);
        info.registerFix(action, null, null, null, null);
      }
      IntentionAction action = QuickFixFactory.getInstance().createPushDownMethodFix();
      info.registerFix(action, null, null, null, null);
    }
    return info;
  }
static HighlightInfo.Builder checkMethodCanHaveBody(@NotNull PsiMethod method, @NotNull LanguageLevel languageLevel)