Search code examples
javajavadoc

How to create custom javadoc tags?


How do I create custom javadoc tags such as @pre / @post? I found some links that explain it but I haven't had luck with them. These are some of the links:

http://www.developer.com/java/other/article.php/3085991/Javadoc-Programming.html

http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html


Solution

  • java code

    /**
     * @custom.mytag hey ho...
     */
    

    java doc option

    -tag custom.mytag:a:"This is my Tag:"
    

    output

    This is my Tag:

    hey ho...