CommentProcessor { public List<JavaComment> stripTags(final Set<String> tagNames, List<JavaComment> originals) { final List<JavaComment> results = new ArrayList<JavaComment>( originals.size()); for (JavaComment original : originals) { results.add(original .match(new JavaComment.MatchBlock<JavaComment>() { @Override public JavaComment _case(JavaDocComment x) { final List<JDTagSection> newTagSections = new ArrayList<JDTagSection>( x.tagSections.size()); for (JDTagSection tagSection : x.tagSections) { if (!tagNames.contains(tagSection.name)) { newTagSections.add(tagSection); } } return _JavaDocComment(x.start, x.generalSection, newTagSections, x.end); } @Override public JavaComment _case(JavaBlockComment x) { return x; } @Override public JavaComment _case(JavaEOLComment x) { return x; } })); } return results; }  List<JavaComment> javaDocOnly(final List<JavaComment> originals); List<JavaComment> stripTags(final Set<String> tagNames,
            List<JavaComment> originals); List<JavaComment> paramDoc(final String paramName, List<JavaComment> originals); List<JavaComment> leftAlign(List<JavaComment> originals);  }
@Test public void testStripTags() { testStripTags("\n", list(""), set("@foo")); testStripTags("\n", list(""), set("@foo")); testStripTags("\n", list(""), set("@foo")); testStripTags("\n", list(""), set("@foo")); final CommentProcessor commentProcessor = new CommentProcessor(); @SuppressWarnings("unchecked") List<JavaComment> comments = list(_JavaEOLComment(" assertEquals(comments, commentProcessor.stripTags(set("@foo"), comments)); }