boolean (@NotNull PsiModifierListOwner element, @NotNull PsiPackage aPackage) { if (element.hasModifierProperty(PsiModifier.PUBLIC)) return true; return !element.hasModifierProperty(PsiModifier.PRIVATE) && JavaPsiFacade.getInstance(element.getProject()).isInPackage(element, aPackage); }