javadoc on method variables?

I'd like to be able to document method level variables with javadoc comments. Does anyone know if that's possible?

What I'm trying to do is to document exception handling inside a method and have a new tag handle the documentation. This way I can just re-run javadoc instead of having to manually update a separate document.

Any thoughts?

Thanks!

Shawn

[386 byte] By [maclagcsa] at [2007-9-28 1:58:47]
# 1

If you want to add a new tag to a doc comment, you can do

that with the -tag option in 1.4.x.

But if you are asking if you can put tags inside the body of a

method and have javadoc recognize them and pass that

information to the Doclet API (and standard doclet), that's

currently not possible, but we have a feature request for it:

http://developer.java.sun.com/developer/bugParade/bugs/4690169.html

If you could give more details, I could include them in the feature

request. Or you can add them yourself at the bottom of the

web page given above.

-Doug Kramer

Javadoc team

dkramera at 2007-7-7 21:31:43 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

Dear Doug,

I have checked the feature request for the link you mention. That feature is not being implemented.

I have the similar request that I need to be able to put the custom tag within the body of a method. Can you please confirm that Javadoc can parse the custom tag in the method body?

If yes, how can I access those information. Actually I need a program that extracts the special tag from source code for and create a special html format not like javadoc. For example. I would like to be able to put @todo in any part of the code and able to generate the list of the todo with it's description. I don't attempt to modify the javadoc format but want to be able to generate the custom document with custom tag.

What should be solution for this problem? I am very new to the Javadoc. What I am understanding is that the Javadoc will parse the code and we can access via the doclet. I would think that I need to modify the standard doclet to make this work. If the Javadoc doesn't parse any tag in the body of the method I will need to write the parser myself, which can be very time consuming.

-Bhuricha

bhurichaa at 2007-7-7 21:31:43 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

Javadoc cannot parse anything within the body of a method, period.

Custom tags won't help.

Perhaps metadata being added to the Java Language in Tiger (1.5.0)

would help? http://www.jcp.org/en/jsr/detail?id=175&showPrint

The standard doclet does no parsing of the source code. All

parsing is done by the javadoc tool, which then passes the

program information via the Doclet API to the standard doclet.

Sorry for the delayed response.

-Doug Kramer

Javadoc team

dkramera at 2007-7-7 21:31:43 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...