The following table lists how the transformation handles changes to previously generated code when you rerun a transformation, assuming that you do not remove the @generated tag.
| Changed code element | Change | Impact of rerunning the transformation |
|---|---|---|
| Class or interface | Add implementation or extension | Added implementation or extension is removed |
| Class or interface | Move | Java class file is regenerated. File overwrite options in the transformation configuration determine whether the original Java class file is deleted. |
| Class or interface | Remove implementation or extension | Previously generated implementation or extension is restored |
| Class or interface | Rename | Class is refactored to reflect the class name in the UML model |
| Enterprise bean class or interface | Add implementation or extension | Added implementation or extension is retained |
| Enterprise bean class | Use code-level tools to modify bean type (CMP or BMP) or modify configuration of local or remote interfaces | Changes are not overwritten To retain the model settings, delete the enterprise bean; to retain the model settings but retain code changes in business methods, use code-level tools to change the enterprise bean type or interfaces to match the model |
| Enterprise bean class | Rename | New enterprise bean class name remains in the deployment descriptor |
| Enterprise bean class or interface | Remove implementation or extension | Enterprise beans are regenerated |
| Enterprise bean field | Add | Field is retained |
| Enterprise bean field | Remove | Previously generated field is restored |
| Enterprise bean field | Rename | Previously generated field is restored Renamed field is retained |
| Field | Move | Field is removed from the new location Field is restored to the previous location |
| Field | Rename | Previously generated field is restored Renamed field is removed |
| Import statement | Add | Import statement is retained |
| Method | Modify return type | Previously generated return type is restored |
| Method | Modify signature | Previously generated method and signature are restored Method with the new signature is removed |
| Method | Move | Method is restored to the previous location Method in the new location is removed |
| Method | Rename | Previously generated method is restored Renamed method is removed |
| Nested class or interface | Rename | Previously generated class or interface is restored Renamed class or interface is removed |
| Nesting class or interface | Rename | Previously generated Java file is restored File overwrite option of the UML-to-Java transformation determines whether or not the new Java file is deleted |
| Qualifier | Modified | Previously generated qualifier is restored |