Updating the UML model
Overview
In "roundtrip" mode and
for Java 5 generation, the "objingid" annotation is generated for
classes, interfaces, enumerations, attributes, associations and operations. This annotation contains the identifier of the
modeling element that has been generated.
The "objingid"
annotation is used to find the modeling element in the Objecteering project
when it is reversed. Without it, the element is searched for by name. This
makes it indispensable to update an element when it has been renamed or moved
in the Java sources. For example,
operations that have changed signature will be updated and not deleted, and
then recreated.
Copying
When copying
code in Java sources, the "objingid"
annotation must never be copied, in order not to lose information when
reversing or updating a modeling element that does not correspond to the Java
code.
Compilation
In order to be
able to compile Java sources with this new annotation, an "import" is
generated to the file containing the declaration of the annotation:
import com.softeam.objecteering.javadeveloper.annotations. objingid;
In the MDA component resources, a
"javadeveloper.jar" archive is provided, containing the declaration of
the annotation. To be able to
compile outside Objecteering, you must add this archive. If you generate the Ant file from
Objecteering, the Jar archive is added automatically.