PsiClass (@NotNull String classNameWithInnerClassesDotSeparated, @NotNull PsiClassOwner file) { for (PsiClass topLevelClass : file.getClasses()) { PsiClass candidate = findClassByTopLevelClass(classNameWithInnerClassesDotSeparated, topLevelClass); if (candidate != null) { return candidate; } } return null; }