The -nodeprecated option in javadoc does not work. What can I do?

I have an obsolete method in my class:

@Deprecated public void deprecatedMethod() { //do bad things } 

I do not want this method to appear in javadoc. I know there is an option called nodeprecated , which:

"Prevents the creation of any obsolete API in the documentation."

So, I use this parameter and it does not exclude the method from javadoc. Is this a bug in javadoc, or am I using it incorrectly? What else can I do?

(I am using eclipse 3.4.2 to create javadoc)

+4
source share
2 answers

You must enable the "-nodeprecated" option in the javadoc export wizard. Warning: this is a javadoc option, not a VM option.

I tested it in Eclipse 3.4 and it worked.

Edit: If only obsolete annotation is enabled, it does not work. You must include the @deprecated tag inside the javadoc method as well.

I don’t know if there is a way to tell javadoc to use @Deprecated anotation (which curiously has no message parameter to document why it is deprecated and what else needs to be used).

Edit: override method to-1.5

You must include the @deprecated tag (or indicator or something else) with the message that you want to display to the user in javadoc after " deprecated ".

 /** This method sets the property A. @see getA @author helios @deprecated This method is not sync safe, use setAOk instead */ public void setA(String value) ... 
+5
source

@helios

john says you should include the javadoc @deprecated tag in the javadoc comment block (/ ** ... * /), as he did this above:

 @deprecated This method is not sync safe, use setAOk instead 

Add this, then use the -nodeprecated option when running javadoc, and the methods will not appear in the generated document.

0
source

All Articles