Optional<PsiClass> (@NotNull PsiClass psiClass, @NotNull String className) { Collection<PsiClass> innerClasses = collectInnerClassesIntern(psiClass); return innerClasses.stream().filter(innerClass -> className.equals(innerClass.getName())).findAny(); }