Including Javadoc comments in generated code

To have Javadoc comments included, generate code as you normally would.

About this task

Javadoc comment generation is available, by default, for Java developers' IBM® Rational® Rhapsody® projects.

In the generated code, you see Javadoc comments based on the descriptions you have provided for model elements. Comments for operations also include any descriptions you have provided for operation arguments.

If you do not see such comments in your code, open the Features window for the configuration you are using, and verify that the Generate JavaDoc Comments check box on the Settings tab is selected. If this option is selected, and you still do not see Javadoc comments in your generated code, read the suggestions listed in Troubleshooting Javadoc comments.

In addition to generating these basic Javadoc comments, you can have Rational Rhapsody include the following standard Javadoc tags: author, deprecated, return, see, since, version. To include these Javadoc tags in your generated code:

Procedure

  1. Open the Features window for a model element that you want to document.
  2. Add Javadoc content by providing values for the various tags displayed on the Tags tab.
  3. Repeat this process for each model element you want to document.
  4. Generate the code.

Results

Once your code includes Javadoc comments, you can generate a Javadoc report using the standard Javadoc process.


Feedback