boolean (PsiClass aClass) { final PsiClass[] innerClasses = aClass.getInnerClasses(); for (PsiClass innerClass : innerClasses) { if (!innerClass.hasModifierProperty(PsiModifier.PUBLIC)) { return false; } } return true; }