Create java classes from UML diagram

Viewed 332

I have to create java classes based on this UML diagram. The problem is that I don't know what is the relationship inside the red shape. I did all the other relationships between the A, B, C, D classes but this one I cannot understand it.

Can anyone give me a hint ?

So far I have :

class A extends B

class D extends C

class C 
List<B> bElement;

class D 
List<A> aElement;

Thanks.

enter image description here

2 Answers

This means that the lower association inherits from the upper one. Just like the lower classes inherit from the upper ones.

The concept of connector inheritance has only been introduced in a recent UML release (according to @Henriette's answer from 2.0 on). Anyhow, neither the lower association nor its generalization is actually needed since its inherited along with the both generalizations anyway.

Personally I have not found a good use for this concept, but know people that do use it (they work on very high abstraction levels in ontology).

P.S. There's not much to be read about the concept in the specs except for p. 692:

Generalization arrows between association lines are interchanged as UMLEdges with Generalizations as modelElements, and sources and targets that are UMLEdges with Associations (including AssociationClasses shown as lines) as modelElements.

Related