A Java class is mapped directly to the UML Class with the stereotype «JavaClass». This stereotype is optional and if the UML Class has no stereotype, Java CE treats it as a Java class. If no appropriate property is found in UML, class modifiers are mapped into UML Class properties or to the Java language properties for Class.
Java class fields, operations and inner classes are mapped to the appropriate UML Properties, UML Operations and UML Classes.
Class mapping table
Java Element
MagicDraw-UML element
Class declaration
UML Class with stereotype «JavaClass» (optional)
Class name
UML Class name
Class Documentation
UML Class Documentation
Class extends Clause
Mapped to the UML Generalization relationship, where the supplier is an extended class and the client is a mapped class
Class Implementation Clause
Mapped to the UML Interface Realization relationship, where the supplier is an extended class and the client is a mapped class.
Visibility Modifier
UML Class “Visibility” property
Abstract Modifier
UML Class “Is Abstract” property
Final Modifier
UML Class “Is Final Specialization“ property
Static Modifier
Java Language property “Static modifier“
Strictfp Modifier
Java Language property “Strictfp modifier“
Tip
title
Example
Java source code
Code Block
language
java
/**
* Comment of the class MyList
*/
public final class MyList extends ArrayList implements Cloneable
{
}