I have a deprecated method in my class:
@Deprecated
public void deprecatedMethod() {
//do bad things
}
I don’t want that method to appear in the javadoc.
I know there’s an option called -nodeprecated which:
“Prevents the generation of any
deprecated API at all in the
documentation.”
So I’m using this option and it doesn’t exclude the method from javadoc. Is it a bug in javadoc or am I using it wrong? What else can I do?
(I’m using eclipse 3.4.2 to produce javadoc)
You have to include “-nodeprecated” option in the Export to javadoc wizard.
Warning: it is a javadoc option, not a VM option.
I’ve tested it in Eclipse 3.4 and it worked.
Edit: If you only include Deprecated annotation it doesn’t work. You have to include @deprecated tag inside method javadoc as well.
I don’t know if there’s a way to tell javadoc to use @Deprecated anotation (which curiously doesn’t have a message parameter to document why is deprecated and what else to use).
Edit: before-1.5 way of deprecate methods
You have to include a @deprecated tag (or indicator or whatever) with the message you want to display to the user in the javadoc after the “deprecated“.