A Java annotation declaration is mapped directly to the UML Interface with the stereotype «JavaAnnotation». Annotation modifiers are mapped into UML Interface properties. Annotation members are mapped to the UML Interface operations with the stereotype «JavaAnnotationMember».
Annotation mapping table
Annotation declaration | UML Interface with stereotype «JavaAnnotation» (optional) |
Annotation name | UML Interface name |
Annotation documentation | UML Interface Documentation |
Visibility modifier | UML Interface "Visibility" property |
Example
Java source code
/** * Comment of annotation */ public @interface Annotation { }
UML model