问题
I would like to be able to use @nnotations to mark classes or methods for exclusion from javadoc.
Is there a way to subclass the standard doclet for this purpose? A first pass over the javadoc-doc didn't reveal a solution.
回答1:
Is proposed but not currently implemented the annotation @exclude
In the link you can find a re-implementation of javadoc, with @exclude implemented
http://www.dzone.com/links/javadoc_tool_with_exclude_tag.html
回答2:
You might like to consider using the Doclava doclet: https://code.google.com/p/doclava/
This implements @hide
which excludes classes and methods from the resulting javadoc.
It also produces a much more nicely formatted output. (That said, there are a few things vanilla javadoc does that doclava doesn't, but nothing that I've ever needed.)
来源:https://stackoverflow.com/questions/12391604/filtering-javadoc-via-annotations