Mapping the UML2 Semantics of Associations to a Java Code Generation Model

  • Authors:
  • Dominik Gessenharter

  • Affiliations:
  • Institute of Software Engineering and Compiler Construction, Ulm University, Germany D-89069

  • Venue:
  • MoDELS '08 Proceedings of the 11th international conference on Model Driven Engineering Languages and Systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is state of the art to provide UML modeling by means of class diagrams and code generation from there. But whereas drawing diagrams is most often well supported, code generation is limited in scope. Association classes, multiplicities, aggregation and composition are not correctly or not at all processed by most code generators. One reason may be that the UML semantics is not formally defined in the UML specification. As a result of that, associations are usually transformed into code by using properties of the same type as the associated classes or corresponding typed sets. This approach must fail although the UML2 Superstructure Specification considers association ends owned by a class to be equal to a property of the owning class. In this paper, we describe why associations should be implemented as classes when generating code from class diagrams.