Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] On the Correct Use of @since Javadoc Tags


I've created an entry in the committer FAQ for this. See http://www.eclipse.org/webtools/faq/CommitterFAQ.html#source_5

Lawrence Mandel

Software Developer
IBM Rational Software
Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
lmandel@xxxxxxxxxx



Arthur Ryman/Toronto/IBM@IBMCA
Sent by: wtp-dev-bounces@xxxxxxxxxxx

11/17/2005 04:57 PM

Please respond to
"General discussion of project-wide or architectural issues."

To
wtp-dev@xxxxxxxxxxx
cc
Subject
[wtp-dev] On the Correct Use of @since Javadoc Tags






At our status telecon today it was reported that a lot of our missing Javadoc errors are caused by missing @since tags. There was some confusion on how to use @since tags, so I thought it would be useful to remind everyone.


When you add a package or class to the API, include a single package or class level @since tag, e.g. @since 1.0


When you add a method to an existing API class, add a method level @since tag.


These rules minimize the number of @since tags you need to include.


The reference for the use of Javadoc in general is [1].


The text for @since is:
@since     (reference page)
Specify the product version when the Java name was added to the API specification (if different from the implementation). For example, if a package, class, interface or member was added to the Java 2 Platform, Standard Edition, API Specification at version 1.2, use:

/**
* @since 1.2
*/


The Javadoc standard doclet displays a "Since" subheading with the string argument as its text. This subheading appears in the generated text only in the place corresponding to where the
@since tag appears in the source doc comments (The Javadoc tool does not proliferate it down the hierarchy).
(The convention once was "
@since JDK1.2" but because this is a specification of the Java Platform, not particular to the Sun JDK or SDK, we have dropped "JDK".)
When a package is introduced, specify an
@since tag in its package description and each of its classes. (Adding @since tags to each class is technically not needed, but is our convention, as enables greater visibility in the source code.) In the absence of overriding tags, the value of the @since tag applies to each of the package's classes and members.
When a class (or interface) is introduced, specify one
@since tag in its class description and no @since tags in the members. Add an @since tag only to members added in a later version than the class. This minimizes the number of @since tags.
If a member changes from protected to public in a later release, the
@since tag would not change, even though it is now usable by any caller, not just subclassers.




[1] http://java.sun.com/j2se/javadoc/writingdoccomments/


Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@xxxxxxx
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top