Java 5 annotations
are modeled like the classes and objects. Therefore,
you need to define this type of annotation before you can use it.
About this task
To create a Java annotation
type:
Procedure
- Open your IBM® Rational® Rhapsody® project
in Java, right-click a package
or class on the browser, and select .
- Type a name for your new annotation type.
- Double-click the annotation type.
The Features
window opens.
- On the Elements tab,
add any legal JDK 5 data type, as shown in the following figure.
- Click <<New> and
type a name for the element.
- Select a type from the Type list.
- Enter a default value if necessary.
Note: The rows on this tab relate to annotation
elements.
- Click OK.