Java roundtrip

The Java code roundtrip is a plug-out directly written in C++.

The Java code roundtrip updates from sources the classes of the model, add missing ones and remove useless classes (after confirmation).

The behavior of the Java code roundtrip plug-out depends on the kind of the element it is applied :

When you start the Java code roundtrip, it asks you for java catalog files, use cancel to finish to give the catalogs (may be immediately), then it perform the roundtrip and may be reverse depending on the case. The sources read by the Java code roundtrip are the ones having the extension specified in the generation settings. The tree formed by the sub-directories produce an equivalent tree of sub-packages, on whose the needed class view and deployment view are made to support the classes and artifacts. When a type is referenced but not defined in the reverse files, a class having the same name is defined under an additional package named unknown.

The reverse/roundtrip setting dialog of the modeler allows to specify through regular expression the files and / or directories whose must not be taken into account during a reverse and roundtrip, for instance to bypass test programs.

Obviously the Java code roundtrip tries to update existing classes and members, but sometimes it can't recognize and old member (mainly in case of renaming) deletes it and create a new one. Of course the Java code roundtrip tries to produce the definitions made in BOUML at the artifact / class / operation / relation / attribute levels. When it is possible it creates a relation rather than an attribute.

The Java code roundtrip works in four steps, during the first step all the project is upload, in the second step the elements to roundtrip are prepared, in the third step it scans all the files to establish the list of defined types, then the last step may roundtrip/reverse the files.

The trace window is used to indicate the steps, the updated classes and possible problems. The trace window is automatically opened by BOUML, it may also be manually opened through the Tools menu.

When the reverse is done the number of updated and created classes is written, then the useless elements are marked (all previous marks are removed) to allow you to know who they are, and the roundtrip ask for you to confirm if is delete these elements or not.

See also Java reverse and Java catalog.

Previous : Java reverse

Next : Java catalog