What is the best way to insert the date of the creation of a class in JavaDoc? Some examples:
Below the author tag with the string "created on"
/**
* Class description
*
* @author Author Name
* created on 2015/04/01
*/
public class ClassName() {
...
}
Below the author tag with the string "Date:"
/**
* Class description
*
* @author Author Name
* Date: 2015/04/01
*/
public class ClassName() {
...
}
With a non-existent @date tag
/**
* Class description
*
* @author Author Name
* @date 2015/04/01
*/
public class ClassName() {
...
}
Other...
And eventually, what is the best date format?
April 1, 2015
2015/04/01
...
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 */
In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file).
Most IDE's have a mechanism to define templates to use when creating new classes. The current date can usually be inserted as part of the template.
For example, here is the documentation for eclipse and this page shows the variables which can be used in templates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With