Java Documentation Comments

When documenting in Java, there are certain rules that you wanna follow since that will leave you a form of HTML documentation of what you just wrote down. The first rule is as following:

1. Documentation comment begins with /** and ends with */

2. @author tag for author of the code

3. @deprecated tag for library classes and methods to indicate that they have been superseded and generally should not be used in new applications.

4. @exception tag for exceptions

5. {@link} tag for generating a link to another part of documentation

6. @param tag for parameters for a method

7. @return tag for the value returned from a method

8. @see tag for cross references (another class/method/ or URL)

9. @throws tag for a synonym for @exception

10. @version tag for current version of the code

With propery documentation, you can use javadoc to generate your own library documentation in html format.

I wish there was one for ActionScript 2. I know there is a commercial version of ASdoc; however, Macromedia should have come up with one too when they released flash mx 2004. How shameful they are!

Comment are closed.