Mapping of UML Elements to Source Code
The assumption is that the input model conforms to UML 2.0 standard. The PIM usually contains only interfaces containing properties and operations and an associated protocol state machine, however in most cases it will contain classes consisting of properties, operations and associated behavioral state machines.
The following tables how the mapping of some UML 2.0 elements to the target language, which is Java in this particular case (see table and ). The mapping has been implemented by the transformation JETs file and the code generator helper class.
The mapping of the UML 2.0 interface elements to Java elements is summarized in the following table.
| UML2 model element | Java |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The mapping of the UML 2.0 class elements to Java elements is summarized in the following table.
| UML2 model element | Java |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|