A Java field is mapped directly to the UML Attribute with the stereotype «JavaField». This stereotype is optional and if a UML Class has no stereotype, Java CE treats it as a Java field. If no appropriate property is found in UML, field modifiers are mapped into the UML Property properties or to the Java language properties. Note that Java field type modifiers are mapped to the specific property Type Modifier, but not to the UML Multiplicity. Field mapping table Java Element | MagicDraw-UML Element |
---|
Field Declaration | UML Property, owned by UML Class, with stereotype «JavaProperty» (optional) | Field Name | UML Property Name
| Field Documentation | UML Field Documentation | Field Type | Mapped to the UML Type property. It is a reference to the UML Classifier; its package structure and name represent the referenced Java class.
| Field Type Modifiers | Mapped to the specified property Type Modifier | Visibility Modifier | UML Property Visibility property | Final Modifier | UML Property Is Read Only property | Static Modifier | UML Property Is Static property
| Transient Modifier | Java Language property Transient modifier | Volatile Modifier | Java Language property Volatile modifier |
Java source code public final class MyClass
{
/**
* myList comment
*/
public static java.util.List myList;
} |
UML model 
|
|