JavaDoc Comment

Posted by [하늘이]
2012. 3. 22. 20:49 IT/Android[안드로이드]
반응형

 http://www.adivo.com/doc/database/JavaDoc.html 
위 사이트 참고


Using JavaDoc Comments

The JavaDoc comment model is based on the JavaDoc tool developed by Sun Microsystems.  While originally developed for documenting Java source code, TechWriter extends the use of JavaDoc for commenting databases.

If you are using or plan to use JavaDoc for your database comments, you must set the comment format to JavaDoc on the Database Settings dialog.  

As TechWriter processes your comments, it will recognize the following JavaDoc tags:

 

JavaDoc TagDescription
@param Allows a description of a parameter to be included in the comment.
@column Allows a description of a database column to be included in the comment.
@return Allows a description of the return value to be included in the comment.
@example Allows an example to be included in the comment.
@link Specifies a link.  See Creating Topic Links for more information.
@linkplain Specifies a link.  See Creating Topic Links for more information.


In addition to JavaDoc tags, the JavaDoc comment model also includes support for a subset of HTML tags that can be used for formatting. 

 

HTML TagDescription
<B> or <STRONG> Changes the font to bold.
<I> or <EM> Changes the font to italic.
<SUP> Changes the text to a superscript
<SUB> Changes the text to a subscript
<OL> and <LI> Formats a numbered list.  The type attribute can also be specified to control the numbering scheme for the list as follows:
  • A - Uppercase alphabetic (ie. A, B, C)
  • a - Lowercase alphabetic (ie. a, b, c)
  • I - Uppercase Roman numerals (ie. I, II, III)
  • i - Lowercase Roman numerals (ie. i, ii, iii)
  • 1 - Arabic numerals (ie. 1, 2, 3)
<UL> and <LI> Formats a bulleted list.
<DIV class='othertitle'> Formats text as a document title.
<H1>,<H2>,<H3> and <H4> Formats text as a heading
<BLOCKQUOTE> Indents the text.
<P> Starts a new paragraph and separates the description from the remarks section of the comments.
<BR> Inserts a line break.
<IMG SRC='...'> References an image.  The style attribute can also be specified that includes one or more of the following CSS attributes:
  • height
  • width
  • text-align

See Referencing Images for more information.

<TABLE>, <COL>, <THEAD>, <TBODY>, <TR>, <TH> and <TD> Used to create a table. See "Using Table Tags" below for an example.

Any other JavaDoc or HTML tags that appear in the comments will be discarded.

Horizontal Alignment

The style attribute that contains a definition for the CSS text-align property can be used to specify specify horizontal alignment for the following tags:

  • <P>
  • <TH>
  • <TD>
  • <H1>
  • <H2>
  • <H3>
  • <H4>
  • <DIV>
  • <IMG>

Example

Below is an example of a comment that uses JavaDoc:

Table for storing employee information.
<P>
This table contains information related to an employee. 
@column EmployeeID ID of the employee.
@column FirstName First name of the employee.
@column LastName Last name of the employee.
@column ManagerID ID of the employee's {@link Tables.CorpDb#Manager manager}

In the above example, the <P> tag separates the text that represents the description from the text that represents the remarks.

Using Table Tags

Below is an example of a table created using HTML tags:

 

<table>
  <col width="25%"/>
  <col width="75%"/>
  <thead>
    <tr><th>Role</th><th>Description</th></tr>
  <thead>
  <tbody>
     <tr><td>User</td><td>Typical end-user</td></tr>
     <tr><td>Admin</td><td>System administrator</td></tr>
     <tr><td>Manager</td><td>Project manager</td></tr>
  </tbody>
</table>

Encoded JavaDoc

If you have already embedded JavaDoc tags within your comments, but have done so by encoding the tags, you will want to select the JavaDoc (encoded) model.  For example, if you have encoded your paragraph tag as &lt;P> instead of <P>, this alternative to the standard JavaDoc model will decode your encoded tags replacing the character entities such as the less than sign so that the tags can be properly parsed.


 

반응형