Defining Values for Javadoc Tags

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 is displayed 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

@author is not generated if the extended attribute has no value.

@exceptions and @throws

@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:

  • From the operation property sheet, click the Implementation tab and click the Exceptions tab to open the Exceptions page. You can type exceptions in this page.



  • In the same property sheet, click the Extended Attributes tab, select the Javadoc@exception line in the list and click the ellipsis button in the Value column. Type values for each declared exception, do not forget to repeat @exception or @throws before each exception.



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 is displayed with its value: