void (@NotNull PsiClass aClass, @NotNull Consumer<? super @NotNull PsiDocCommentBase> sink) { collectDocComment(aClass, sink); List<PsiDocCommentOwner> children = PsiTreeUtil.getChildrenOfTypeAsList(aClass, PsiDocCommentOwner.class); for (PsiDocCommentOwner child : children) { if (child instanceof PsiClass) { collectDocComments((PsiClass)child, sink); } else { collectDocComment(child, sink); } } }