boolean (@NotNull PsiClass containingClass, @NotNull String memberName, @NotNull PsiElement context) { final PsiField field = containingClass.findFieldByName(memberName, true); if (field != null && PsiUtil.isAccessible(field, context, null)) { return true; } final PsiMethod[] methods = containingClass.findMethodsByName(memberName, true); for (PsiMethod method : methods) { if (PsiUtil.isAccessible(method, context, null)) { return true; } } final PsiClass innerClass = containingClass.findInnerClassByName(memberName, true); return innerClass != null && PsiUtil.isAccessible(innerClass, context, null); }