Specifying the Java collection types that UML-to-Java transformations generate

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 UML collection type in the source project, you can specify the Java™ collection type that the transformation generates.
The UML collection type is determined by the following properties of the model elements:
Note: You can also specify the Java collection type that the transformation generates by applying the «JavaCollection» or the «JavaArray» stereotype to the UML attribute, association or operation. Applying the stereotype overrides the default collections that you select in the transformation configuration. These stereotypes are available in the UML-to-Java transformation profile.

To specify the Java 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
UML-to-Java transformations
Related reference
Interpretation of UML elements by UML-to-Java transformations

Feedback