You can specify that the UML-to-Java 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.
Before you apply the UML-to-Java transformation, you should read the
information that is available at . From the
Transformations/Configurations list,
select
UML to Java. On the
Transformation
Description page, click
View Transformation Documentation.
You
must be in the Modeling perspective.
To generate getter and setter methods for Java™ classes that the UML-to-Java transformation
generates:
- Click .
- In the Configure Transformations window, from
the Transformations/Configurations list, select a transformation
configuration.
- Click the Properties tab.
- On the Properties page, select the Generate
getters and setters check box.
- Click Apply.
- Click Close.