@Override
  public void checkConflictsOnMember(@NotNull PsiMember member,
                                     @Nullable String newVisibility,
                                     @Nullable PsiModifierList modifierListCopy,
                                     @NotNull PsiClass targetClass,
                                     @NotNull Set<PsiMember> membersToMove,
                                     @NotNull MultiMap<PsiElement, @DialogMessage String> conflicts) {
    if (member instanceof PsiMethod method && hasMethod(targetClass, method) ||
        member instanceof PsiField field && hasField(targetClass, field)) {
      String message = RefactoringBundle.message("0.already.exists.in.the.target.class", RefactoringUIUtil.getDescription(member, false));
      conflicts.putValue(member, StringUtil.capitalize(message));
    }
    else if (member instanceof PsiEnumConstant && !targetClass.isEnum()) {
      String message = JavaRefactoringBundle.message("dialog.message.enum.constant.0.won.t.be.compilable.in.1",
                                                     RefactoringUIUtil.getDescription(member, true),
                                                     RefactoringUIUtil.getDescription(targetClass, true));
      conflicts.putValue(member, StringUtil.capitalize(message));
    }
    else if (member instanceof PsiField && targetClass.isInterface()) {
      boolean constant = member.hasModifierProperty(PsiModifier.STATIC) && ((PsiField)member).hasInitializer();
      if (!constant) {
        String message = JavaRefactoringBundle.message("dialog.message.non.constant.will.not.be.compilable.in.interface",
                                                       RefactoringUIUtil.getDescription(member, true));
        conflicts.putValue(member, message);
      }
    }
    else if (member instanceof PsiClassInitializer && targetClass.isInterface()) {
      String message = JavaRefactoringBundle.message("dialog.message.static.class.initializers.are.not.allowed.in.interfaces");
      conflicts.putValue(member, message);
    }

    RefactoringConflictsUtilImpl.analyzeUsedElementsAfterMove(member, member, membersToMove, null, targetClass, targetClass, conflicts);
  }
@Override
  public void checkConflictsOnMember(@NotNull PsiMember member,
                                     @Nullable String newVisibility,
                                     @Nullable PsiModifierList modifierListCopy,
                                     @NotNull PsiClass targetClass,
                                     @NotNull Set<PsiMember> membersToMove,
                                     @NotNull MultiMap<PsiElement, @DialogMessage String> conflicts)