boolean (PsiClass outer, PsiClass inner) { PsiMethod[] constructors = inner.getConstructors(); return !inner.hasModifierProperty(PsiModifier.STATIC) && PsiUtil.isAccessible(inner, myPosition, outer) && (constructors.length == 0 || ContainerUtil.exists(constructors, c -> PsiUtil.isAccessible(c, myPosition, outer))); }