What's New in Javadoc 5.0 |
Javadoc Tool |
This document describes the changes made to the Javadoc tool between versions 1.4.2 and 5.0 (formerly 1.5.0).
The changes listed below include the bug number and whether the fix was in the Javadoc tool front end ("tool") or standard doclet ("stddoclet"). The term "regression" appears for features that regressed at some point -- usually for features that worked in 1.3.x, broke in 1.4.x, and have been fixed in 5.0.
{@value package.class#field}
.
This enables it to be used in any doc comment, not just in the
doc comment of the constant field.
(4764045, stddoclet, 2 votes)
package.html
(which supports only comments, not annotations).
If package-info.java
is present, javadoc should
ignore package.html
and look instead for the
package doc comment immediately preceding the (possibly
annotated) package declaration. The javadoc tool handles the
selection and parsing of package-info.java
and
package.html
and passes the doc comments to the doclet.
See Package
Comment Files
.
@deprecated
tag
for deprecating program elements. The Java Language Specification now
requires compilers to issue warnings when the
@Deprecated
annotation (but not necessarily the tag) is used.
The @deprecated
tag provides a place to describe
what replaces the deprecated program element.
See @Deprecated annotation.
All new features are listed below.
All bug fixes are listed below.
The Javadoc tool tries -- to the extent possible -- to present
so-called "legacy" doclets with a view of the program that
1) continues to work with pre-5.0 source code, and 2) matches
their expectations for 5.0 source code. So, for example, type
parameters and type arguments are stripped from generic
constructs, type variables and wildcard types are replaced by
their erasures, and ClassDoc.fields()
will
return enum constants.
But legacy support is not specified with precision. It's a compatibility mode that will suffice until the doclet gets updated to understand the language it is operating on. The only guarantee is source and binary compatibility of doclets themselves: when using the 5.0 Javadoc tool, if your doclet is based on 1.4 and the source code on which you're operating is also based on 1.4, then you can still compile the doclet and it will still operate as before (modulo bug fixes).
{@value package.class#member label}
.
This enables it to be used in any doc comment.
(4764045, stddoclet)
@deprecated
tag
for deprecating program elements.
See @Deprecated annotation.
For more link bug fixes, see "Tags and Taglets", associated with the
{@docRoot}
tag.
package-info.java
is a reserved name
for a source file to store package comments and annotations.
package-info.java
is described above.
Standard Doclet Implementation
Copyright © 2004 Sun Microsystems, Inc. All Rights Reserved. Please send comments to: |
Java Software |