Newbie Javadoc Questions

I am a relative newbie at using the Javadoc tool. I have two questions:

1. When I comment my code with @version, the docs say to use %I%, %G%, which I understand is supposed to be replaced with the Java version that the code uses. However, the generated docs still say "Version: %I% %G%. What am I doing wrong here?

2. In my method summarys, many of the return data types are rather "verbose", i.e. they will say "java.lang.String" instead of "String". Is there a way to just make it use the type, and not the full package name?

Thanks,

Jason

[573 byte] By [dartman130a] at [2007-10-1 19:35:19]
# 1

> 1. When I comment my code with @version, the docs say

> to use %I%, %G%, which I understand is supposed to be

Where did you read this? Seemingly not in the documentation of javadoc. I guess your build environment or its version control system might take care of the replacement on checking in the source code.

Harald.

BioMed Information Extraction: http://www.ebi.ac.uk/Rebholz-srv/whatizit

pifpafpufa at 2007-7-11 15:49:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
I believe that the %I% and %G% are used by some version control systems. I know SCCS will replace those values with the current verison when you do a get, and back to the % values when you do a checkout.
gte42ea at 2007-7-11 15:49:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

As far as shortening java.lang.String, you can use the -noqualifier option:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#noqualifier

javadoc -noqualifier java.lang MyClass.java

Also notice that javadoc automatically shortens the name if it is a link:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#shortened

So you could instead use -linkoffline to change java.lang.String (no link) into String (link):

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#linkoffline

dhkramera at 2007-7-11 15:49:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...