void (final PsiElement targetElement, final PsiElement context) { if (targetElement instanceof PsiFunctionalExpression) { myConflicts.putValue(targetElement, JavaRefactoringBundle.message("functional.interface.broken")); return; } final PsiClass targetClass = targetElement instanceof PsiClass ? (PsiClass)targetElement : null; if (targetClass != null) { for (final PsiMember movedMember : myMovedMembers) { checkMemberPlacementInTargetClassConflict(targetClass, movedMember); } } Members: for (PsiMember member : myMovedMembers) { if (member.hasModifierProperty(PsiModifier.STATIC)) continue; for (PsiReference ref : ReferencesSearch.search(member, member.getResolveScope(), false)) { final PsiElement element = ref.getElement(); if (element instanceof PsiReferenceExpression referenceExpression) { if (myConflicts.containsKey(element)) continue; final PsiExpression qualifier = referenceExpression.getQualifierExpression(); if (qualifier instanceof PsiSuperExpression && isSuperCallToBeInlined(member, targetClass, myClass)) continue; if (qualifier != null) { final PsiType qualifierType = qualifier.getType(); PsiClass aClass = null; if (qualifierType instanceof PsiClassType) { aClass = ((PsiClassType)qualifierType).resolve(); } else { if (qualifier instanceof PsiReferenceExpression) { final PsiElement resolved = ((PsiReferenceExpression)qualifier).resolve(); if (resolved instanceof PsiClass) { aClass = (PsiClass)resolved; } } } if (!InheritanceUtil.isInheritorOrSelf(aClass, targetClass, true)) { myConflicts.putValue(referenceExpression, RefactoringBundle.message("pushed.members.will.not.be.visible.from.certain.call.sites")); break Members; } } } } } RefactoringConflictsUtil.getInstance().analyzeAccessibilityConflictsAfterMemberMove(myMovedMembers, targetClass, null, context, myAbstractMembers, ref -> !InheritanceUtil.hasEnclosingInstanceInScope(myClass, ref.getElement(), true, false), myConflicts ); }