You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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

Java ElementUML element
Annotation declarationUML Interface with stereotype «JavaAnnotation» (optional)
Annotation nameUML Interface name
Annotation documentationUML Interface Documentation
Visibility modifierUML Interface "Visibility" property

Example

Java source code

/**
* Comment of annotation
*/
public @interface Annotation
{
}

UML model

UML Interface representing Java annotation type

Related Pages: