Search code examples
javajavadoc

What is the date format for the "since" annotation in javadoc?


I've tried googling this but didn't find a complete answer to this question:

Can I set the date format for the @since annotation in javadoc? Or how do I see what format is set?


Solution

  • The @since tag should be used to define which version you added the method, class, etc. This is your hint to other developers that they should only expect the method when they run against a particular version of the package. I would consider these uber-important parts of the documentation if you're shipping your code as a library intended for someone else to use.

    /**
     * @author    Firstname Lastname <address @ example.com>
     * @version   1.6        (current version number of program)
     * @since     1.5        (the version of the package this class was first added to)
     */
    

    For more information visit:

    http://en.wikipedia.org/wiki/Javadoc

    javadoc: @version and @since