Generating getter and setter methods with the UML-to-Java transformation

You can specify that the transformation generate a field with getter and setter methods for each UML property. If the isLeaf (final) or isReadOnly are set to true, no setter is generated. If the isDerived property is set to true, the setter implementation is empty.
To generate getter and setter methods for Java™ classes that the transformation generates:
  1. In the Project Explorer view, right-click a transformation configuration file; then click Open.
  2. Click the UML to Java Options tab.
  3. On the UML to Java Options page, select the Generate getters and setters check box.
  4. Click File > Save.
The next time that you run the transformation, for each attribute that is part of a source UML model element, the transformation generates getter and setter methods in the Java source code.
Note: If you create a new transformation configuration, you can specify this information on the UML to Java Options page of the New Transformation Configuration wizard.

Feedback