Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id431974293
Content column
id431974296
Content block
id431974295

A Java annotation member is mapped directly to the UML Operation owned by the interface stereotyped as «JavaAnnotation». This operation, by itself, can have the stereotype «JavaAnnotationMember». However, it is optional, unless specify a default value for it.

A Java annotation member type is mapped to a UML Type property of a UML Parameter with the “Return“ direction kind.


Annotation member mapping table:

Java ElementUML element
Annotation member declaration

UML Operation with the stereotype «JavaAnnotationMember» (Optional), owned by a UML Interface with the stereotype «JavaAnnotation». 

Annotation member name

UML Operation Name

Annotation member documentation

UML Operation Documentation

Annotation member type

Mapped to the UML Parameter type with the “return“ direction kind (resides in UML Operation parameters list)

Annotation member type modifier

Mapped to the MagicDraw specified property “Type Modifier“

Default value

{JavaAnnotationMemberDefaultValue} tagged value of a «JavaAnnotationMember» stereotype. The stereotype is set on UML Operation



Tip
titleExample

Java source code

Code Block
languagejava
/**
* Comment of annotation
*/
public @interface Annotation
{
int id();
String name() default "[unassigned]";
}


UML model


Content block
id431974292

Related Pages:

Children Display
pageMapping to UML Rules