boolean (@NotNull PsiMethodReferenceExpression methodReference) { PsiElement method = methodReference.resolve(); if (!(method instanceof PsiMethod)) { return true; // referent is accessible by default } else { PsiTypeElement qualifierType = methodReference.getQualifierType(); boolean qualifierAccessible = qualifierType == null || isAccessibleType(qualifierType.getType()); return qualifierAccessible && isPublicMember((PsiMember)method); } }