UML Class Diagram and Generics

2020-01-29 04:53发布

How do you indicate a generic class or interface in a Class Diagram?

I'm looking for two things really:

  1. One is how do I model generic java classes if i were doing it with pen and paper.
  2. Secondly, what uml tools out there support generic classes/interfaces.

Thanks!

标签: java uml
7条回答
2楼-- · 2020-01-29 05:25

One is how do I model generic java classes if i were doing it with pen and paper.

It is generalization arrow, base class, if it is abstract, should be written in italics. Also can be marked with stereotype.

Secondly, what uml tools out there support generic classes/interfaces.

Use http://staruml.io/. Really nice tool, you can manage all project diagrams in one place. At right top corner, there is object/diagram tree, so you can use same classes(other objects) at different diagrams.

查看更多
登录 后发表回答