Implementing UML associations in Java: a slim code pattern for a complex modeling concept

  title={Implementing UML associations in Java: a slim code pattern for a complex modeling concept},
  author={Dominik Gessenharter},
  journal={Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages},
  • Dominik Gessenharter
  • Published 6 July 2009
  • Computer Science
  • Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages
Relationships are difficult to implement for two main reasons: Firstly, they provide a complex semantics for relating entities and secondly, relationships are not first class constructs in modern programming languages. The challenge of implementing relationships in code is to resolve the semantics of abstract model elements and turn them into references or pointers of the target language. Language extensions or libraries are often discussed as a means of facilitating the translation of… 

Figures from this paper

Code Generation for UML 2 Activity Diagrams - Towards a Comprehensive Model-Driven Development Approach

This paper presents an approach for code generation for activities preceded by model transformations and enhances structural modeling by providing generation of code for accessing structural features based on the UML semantics of Actions.

From Formal Semantics to Executable Models: A Pragmatic Approach to Model-Driven Development

This paper identifies some major unsolved problems of MDD concerning the contemplated areas and postulate a pragmatically motivated couple of hypotheses defining the authors' constraints for solving these problems.

Multitudes of Objects: First Implementation and Case Study for Java

This work shows how it has extended the Java 7 programming language with multiplicities, that is, with expressions that evaluate to a number of objects not wrapped in a container, and reports on the experience it has gathered using thesemultiplicities in a case study.

Towards OntoUML for Software Engineering: From Domain Ontology to Implementation Model

This paper proposes a method of transformation of an ontological model into a software-engineering object-oriented class model in UML and its instantiation based on the following best practices: pure object- oriented paradigm and approach of dividing state and identity as introduced in the Clojure programming language.

Model-driven software development with ACTIVECHARTS - a case study

This report conducts a case study using a highly sophisticated code generator for the development of a sample project and outlines benefits of code generation for highly abstract modeling concepts in the context of an easily manageable project.

Contributions to Declarative Implementation of Static Program Analysis

A new static analysis-based tool presented in this thesis is a regression test selection tool, which reduces testing time for Java software development, and develops the first version of the compiler with fully declarative static analysis, based on the extensible Java compiler ExtendJ.

Adaptable code generation of consistent and customizable data-centric applications with MontiDEx

  • Alexander Roth
  • Computer Science
    Aachener Informatik-Berichte, Software Engineering
  • 2017
Using the methods proposed in this thesis improves development and prototyping of data-centric applications by providing a unified set of languages and lightweight methods abstracting from implementation details and supporting customization and adaptation concerns of generated source code and MDD tools.

Towards a UML profile on formal semantics for modeling multimodal interactive systems - concepts for modeling interactive systems using standard tools of software engineering

This work presents an approach to extend UML for modeling interactive systems by using and extending UML state diagrams, creating UML compliant extensions based on UML profiles, and defining formal semantics for extensions including behavioral aspects by means of Abstract State Machines.

Reuse and Customization for Code Generators: Synergy by Transformations and Templates

This paper presents a meta-modelling framework for model-driven development (MDD) that automates the very labor-intensive and therefore time-heavy and expensive process of generating source code from abstract models.

Multitudes of Objects

This work shows how the Java 7 programming language has been extended with multiplicities, that is, with expressions that evaluate to a number of objects not wrapped in a container, and reports on the experience the authors have gathered using thesemultiplicities in a case study.



Mapping UML Associations into Java Code

These principles have been used to write a series of code patterns that are used in combination with a tool that generates code for associations, which are read from a model stored in XMI format.

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

This paper describes why associations should be implemented as classes when generating code from class diagrams and why 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.

Implementing associations: UML 2.0 to Java 5

A number of code generation patterns are developed that allow the automatic generation of Java code from UML class diagrams that support these new and complex association concepts, providing a useful automation facility that bridges the gap between the concept of an association and lower level object-oriented programming languages.

Engineering Associations: From Models to Code and Back through Semantics

A novel mathematical framework is presented and a precise semantics for several association constructs, whose implementation has been considered problematic, are built.

Design of a class library for association relationships

This paper develops an approach to supporting the association relationship through the design of a reusable class library that hides most of the complexity and guarantees that the consistency of the relationship is maintained automatically.

Implementing First Class Relationships in Java

A new model for relationships in OO is developed which distinguishes tuples and relationships and supports both as first-class constructs and a library for Java is described which provides this model.

Relationship aspects

It is shown how relationships can be implemented as a library of aspects in Aspect/J, making the resulting programs easier to read, write and reuse, and as efficient as hand-written code.

On the Semantics of Associations and Association Ends in UML

  • D. Milicev
  • Computer Science
    IEEE Transactions on Software Engineering
  • 2007
This paper describes a problem with one widely assumed interpretation of the uniqueness of association ends, the restrictive interpretation, and proposes an alternative, the intentional interpretation that improves expressiveness of the modeling language and has some other interesting advantages.

Model-driven development: its essence and opportunities

  • B. Selić
  • Computer Science
    Ninth IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC'06)
  • 2006
The problems that plague current programming approaches are analyzed and a short description of the essential features of model-driven development and the potential benefits that it can bring are described.

Basic Relationship Patterns

Basic patterns which describe how objects can be used to model relationships within programs are presented, so programs and designs can be made smaller, more exible, and easier to understand and maintain.