2

Suppose I have the following code:

class A<U> {}
class B<T> : A <B<B<T>>> {}

How such types can be represented in UML class diagram?

user2341923
  • 4,537
  • 6
  • 30
  • 44

1 Answers1

3

In pure UML, I would use UML Template take a look at the section 17.4 of UML2.4.1 specification. You can also take a look at this thread dealing with Java generic. But if you want to generate C# code from your UML model, the UML specification would depend of the used tool and its generator...

For example under Modelio, class A<U> {} will be represented as

enter image description here

Community
  • 1
  • 1
Red Beard
  • 3,436
  • 1
  • 14
  • 17