JDComment (@NotNull PsiElement commentOwner, @NotNull CommentFormatter formatter) { if (commentOwner instanceof PsiClass) { return new JDClassComment(formatter); } else if (commentOwner instanceof PsiMethod) { return new JDMethodComment(formatter); } else { return new JDComment(formatter); } }