boolean (PsiClass aClass) { if (!myAcceptsInner && !(aClass.getParent() instanceof PsiJavaFile)) return false; if (!myAdditionalCondition.value(aClass)) return false; // we've already checked for inheritance return myAcceptsSelf || !aClass.getManager().areElementsEquivalent(aClass, myBase); }