Specifying the UML collection types that the Java-to-UML transformation generates

You can specify how the transformation transforms the selected Java™ collection types in the source Java project into UML collection types. A collection represents a group of model elements. The collection type determines whether duplicate model elements in the collection can exist or whether the model elements are ordered.

For each Java collection type in the source project, you can specify the UML collection type that the transformation generates. You can map one Java collection type to one UML collection type. The default selections map the Java Collection, SortedSet, List, and Set classes to the UML Bag, OrderedSet, Sequence, and Set collection types. When you run the transformation, if it can identify Java collections or arrays in the code, and identify the type of the collections or arrays, the transformation applies the «JavaCollection» or the «JavaArray» stereotype to the generated UML element and populates the values of the stereotype properties. Otherwise, the transformation generates an adaptable reference and does not apply a stereotype to the generated UML element.

See the related reference topic below for more information about how the transformation populates UML collection properties when it transforms Java collections.

To specify the UML collection types that the transformation generates:

  1. In the Project Explorer view, right-click a transformation configuration file; then click Open.
  2. On the Collections tab, from each UML collection type list, select a Java collection type. To specify a custom value, type the value in the appropriate collection field.
  3. Click File > Save.
The options are applied the next time that you run the transformation.
Note: If you create a new transformation configuration, you can specify this information on the Collections page of the New Transformation Configuration wizard.
Related concepts
Java transformation profile
Related reference
Interpretation of source code by Java-to-UML transformations

Feedback