public static void searchForHierarchyConflicts(PsiMethod method,
                                                   MultiMap<PsiElement, @DialogMessage String> conflicts,
                                                   String modifier) {
      SuperMethodsSearch.search(method, ReadAction.compute(method::getContainingClass), true, false).forEach(
        new ReadActionProcessor<>() {
          @Override
          public boolean processInReadAction(MethodSignatureBackedByPsiMethod methodSignature) {
            final PsiMethod superMethod = methodSignature.getMethod();
            if (!hasCompatibleVisibility(superMethod, true, modifier)) {
              conflicts.putValue(superMethod, IntentionPowerPackBundle.message(
                "0.will.have.incompatible.access.privileges.with.super.1",
                RefactoringUIUtil.getDescription(method, false),
                RefactoringUIUtil.getDescription(superMethod, true)));
            }
            return true;
          }
        });
      OverridingMethodsSearch.search(method).forEach(new ReadActionProcessor<>() {
        @Override
        public boolean processInReadAction(PsiMethod overridingMethod) {
          if (!isVisibleFromOverridingMethod(method, overridingMethod, modifier)) {
            conflicts.putValue(overridingMethod, IntentionPowerPackBundle.message(
              "0.will.no.longer.be.visible.from.overriding.1",
              RefactoringUIUtil.getDescription(method, false),
              RefactoringUIUtil.getDescription(overridingMethod, true)));
          }
          else if (!hasCompatibleVisibility(overridingMethod, false, modifier)) {
            conflicts.putValue(overridingMethod, IntentionPowerPackBundle.message(
              "0.will.have.incompatible.access.privileges.with.overriding.1",
              RefactoringUIUtil.getDescription(method, false),
              RefactoringUIUtil.getDescription(overridingMethod, true)));
          }
          return true;
        }
      });
    }
public static void searchForHierarchyConflicts(PsiMethod method,
                                                   MultiMap<PsiElement, @DialogMessage String> conflicts,
                                                   String modifier)