Setting the association end ownership in UML: What does it mean with respect to generated code in visual paradigm (or in other UML tools)?

后端 未结 3 864
情深已故
情深已故 2021-01-14 19:05

What is the effect of setting the association end ownership from \"association\" to \"classifier\" on the code that gets generated?

In other words,

0) I star

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-14 19:31

    I could give you a general approach about how a general UML 2 source code generator might work (UML spec doesn't specify how to generate code from UML models)

    From my point of view, if the association ends (property) belongs to the UML class, then a field should be generated in the source code class, whereas if it belongs to the association no field is generated (allows you to model unidirectional or bidirectional associations between classes). Have a look to the example I've recently posted

提交回复
热议问题