Generating Java files
For each concepts of the class modeling, it's possible to preview the Java code.
You can see it in the Java Code tab in the object's properties window.
Right-click on an object in the class model and choose Properties from the pop-up menu.
Select the Java Code tab.
Generate the Java files (.java)
The java code generation feature builds the Java files from the Compilation Units
.
- A Compilation Unit is used to define the Java file content.
- A Compilation Unit can contain one or many classes.
- With the Compilation Unit concept you can add the import definition for classes and packages.
You can start the generation of the Java files globally from the class model, a package, or for only one compilation unit.
Just choose Generate > Java File(s) from the pop-up menu of these concepts.
After having selected the generation directory, a java file will be generated for each compilation unit.
Generate the missing compilation units
When your class model grows, it can be difficult to assure manually that all classes are linked to a compilation unit.
The feature Generate > Missing Compilation Unit(s), available on the class model and on the packages,
offer you to generate the missing compilation units.