Java 5 annotations

IBM® Rational® Rhapsody® for Java developers supports the concept of the Java 5 annotation through modeling and code generation. Java users can use Java annotations to model and generate code for all key Java 5 concepts. You can create annotations within the Rational Rhapsody environment and then generate the annotations within the generated code.

Note the following possible uses for Java annotations:

To add a JavaAnnotation to a model element, you must do the following general steps:

  1. Create a JavaAnnotation type; see Creating a JavaAnnotation type.
  2. Add the JavaAnnotation and assign values to the elements of the annotation; see Using a JavaAnnotation type.
  3. Add the annotation to one or more Java model elements using a dependency with a AnnotationUsage relationship; see Using a JavaAnnotation within a model.

Feedback