Is there a standard representation for typed java collections in UML2? I am working on a class diagram and would like to avoid Java syntax, when using something like Map as type for a class attribute.
- foo : Map<Integer, String>
Is there a standard representation for typed java collections in UML2? I am working on a class diagram and would like to avoid Java syntax, when using something like Map as type for a class attribute.
- foo : Map<Integer, String>
UML2 has parameterized classes, and the syntax is in fact pretty much the same as Java's - both Java and the UML spec were inspired by the C++ syntax here.
I'm against using too much design documents to program. Documents are only for communicating ideas, IMHO.
So if you need Java Types for your UML chances are:
you are reverse engineering: then Java Syntax will be fine
you are trying to program trhough UML: don't do it. Program in Java. Use UML only for object relation and collaboration