Adding JDK classes in the UML class diagram definition

I am using UML Lab as a part of our Academic Project-Master and stumbled upon a problem. Hopefully it is quite naive, however I want to add JDK defined classes as parameters and return types for operations defined in Class diagram. For example: java.util.Map or java.util.List.

Any help would be greatly appreciated.



  • Hi Sid,

    the generated code depends on the the chosen code style (--> templates). E.g. in the default style, just set the Operation's Bounds (Properties view) to 0..* or 1..* in order to get java.util.Set<..>.

    If you require specific return types, it is also possible to add the corresponding class to the model (remember to apply the Stereotype "Reference" on it to prevent code generation for the Class) and use it as a return type.

    And remember: If there is something that can't be modeled, just generate code and write it directly in the source code. UML Lab's Round-Trip-Engineering will update your model in an instance.

Sign In or Register to comment.