Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert creation date in JavaDoc [closed]

Tags:

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
...
like image 300
ᴜsᴇʀ Avatar asked Mar 31 '15 23:03

ᴜsᴇʀ


People also ask

What is @since in Javadoc?

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 */

How do I create an automatic Javadoc?

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).


1 Answers

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.

like image 81
Brett Okken Avatar answered Sep 19 '22 10:09

Brett Okken