void (@NotNull List<PsiClass> classList) { String memberName = getRequiredMemberName(myReferenceElement); if (memberName != null) { classList.removeIf(psiClass -> { PsiField field = psiClass.findFieldByName(memberName, true); if (field != null && field.hasModifierProperty(PsiModifier.STATIC) && isAccessible(field, myReferenceElement)) return false; PsiClass inner = psiClass.findInnerClassByName(memberName, true); if (inner != null && isAccessible(inner, myReferenceElement)) return false; for (PsiMethod method : psiClass.findMethodsByName(memberName, true)) { if (method.hasModifierProperty(PsiModifier.STATIC) && isAccessible(method, myReferenceElement)) return false; } return true; }); } }