Chapter 14 Working with Java
Javadoc is a tool delivered in the JDK that parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing model objects.
Javadoc comments are included in the source code of an object, immediately before the declaration of any object, between the characters /** and */.
A Javadoc comment can contain:
For example, in the following code preview page, you can read the tag @author, and the comment inserted from the Comment box in the General page of the class property sheet.
The following table summarizes the support of Javadoc comments in PowerDesigner:
Javadoc |
Description |
Applies to |
Corresponding extended attribute |
---|---|---|---|
%comment% | Comment box. If Javadoc comments are not found, standard comments are reversed instead | Class, interface, operation, attribute | — |
@since | Adds a "Since" heading with the specified since-text to the generated documentation | Class, interface, operation, attribute | Javadoc since |
@deprecated | Adds a comment indicating that this API should no longer be used | Class, interface, operation, attribute | Javadoc deprecated |
@author | Adds an Author entry | Class, interface | Javadoc author.
If the tag is not defined, the user name from the Version Info page is used, otherwise the defined tag value appears |
@version | Adds a Version entry, usually referring to the version of the software | Class, interface | Javadoc version |
@see | Adds a "See Also" heading with a link or text entry that points to reference | Class, interface, operation, attribute | Javadoc see |
@return | Adds a "Returns" section with the description text | Operation | Javadoc misc |
@throws | Adds a "Throws" subheading to the generated documentation | Operation | Javadoc misc. You can declare operation exceptions |
@exception | Adds an "Exception" subheading to the generated documentation | Operation | Javadoc misc. You can declare operation exceptions |
@serialData | Documents the types and order of data in the serialized form | Operation | Javadoc misc |
@serialField | Documents an ObjectStreamField component of a Serializable class' serialPersistentFields member | Attribute | Javadoc misc |
@serial | Used in the doc comment for a default serializable field | Attribute | Javadoc misc |
@param | Adds a parameter to the Parameters section | Attribute | Javadoc misc |
Copyright (C) 2005. Sybase Inc. All rights reserved. |