protected boolean isAccessible(final PsiElement element) { if (element instanceof PsiMember) { final PsiMember member = (PsiMember) element; return JavaResolveUtil.isAccessible( member, member.getContainingClass(), member.getModifierList(), this, null, null); } return true; }
private static boolean shouldSuggestConstructor( @NotNull PsiClass psiClass, @NotNull PsiElement position, PsiMethod constructor) { return JavaResolveUtil.isAccessible( constructor, psiClass, constructor.getModifierList(), position, null, null) || willBeAccessibleInAnonymous(psiClass, constructor); }