If you use the javadoc command-line tool, you can exclude public methods by marking them as Deprecated and using the -nodeprecated parameter. But if you want something more complex, you will have to implement it yourself.
A rough idea on how to do this:
- Create custom annotations @ API1, @ API2, etc.
- Classify your methods using these annotations (i.e. mark them)
- Write a custom Ant task that reads a configuration parameter (for example, from a file) that tells which API you want to generate Javadoc for.
- Still in the Ant task, loop through the annotated methods and replace any API annotations that are NOT the selected API with deprecated annotation. This excludes them from Javadoc.
IMHO, this is a lot of trouble. As they said in the comments, if you have a class with multiple interfaces (for different user profiles, I think?), Consider writing separate interfaces.
dario_ramos
source share