Chapter 14 Working with Java
You can define values for Javadoc tags from the JavaDoc tab of an object property sheet.
To do so, you have to select a Javadoc tag in the list of extended attributes and click the ellipsis button in the Value column. The input dialog box that appears allows you to create values for the selected Javadoc tag. For example, if the data type is set to (Color), you can select another color in the Color dialog box by clicking the ellipsis button in the Value column.
Note: You define values for the @return, @exception, @throws, @serialData, @serialField, @serial JavaDoc, and @param comments in the Javadoc@misc extended attribute.
Javadoc tags are not generated if no extended attribute is valued.
Do not forget to repeat the Javadoc tag before each new value, some values being multi-line. If you do not repeat the Javadoc tag, the values will not be generated.
When you assign a value to a Javadoc tag, the tag and its value appear in the code preview page of the corresponding object.
@author is not generated if the extended attribute has no value.
@exceptions and @throws are synonymous Javadoc tags used to define the exceptions that may be thrown by an operation.
To use these tags you can proceed as follows:
It is also possible to type values directly after the @exception or the @throws tags in the Extended Attributes page. These comments describe exceptions that are not listed in the operation exceptions, and do not appear after the throws
parameter in the Preview page of the class.
When you preview the generated code, each exception appears with its value:
Copyright (C) 2005. Sybase Inc. All rights reserved. |