In the class hierarchy of the generated Java source code (Figure 8.1), class StateMachine is the common superclass of all the DCharts models. It defines the common interface for the models, so that one model may invoke methods in another without explicitly specifying its concrete type. For each DCharts model (or submodel to be imported), a Java class with the same name is synthesized. The class with the same name as the .des file specified on the command-line is the main class.
SCC searches for the submodels to be imported into the main model. Those submodels are converted into corresponding Java classes, written in the same Java source file. In addition, it also generates code for the subsubmodels (if any) imported into those submodels. This search repeats until no new model is found under the IMPORTATION descriptor of all those model descriptions. If a model is imported by more than one model, or a model is imported by itself directly or indirectly, it is converted into only one class, which can then be reused in different importing models.
For example, in Figure 8.1, class MainModel is generated from a DCharts model in MainModel.des. It imports other models, and those imported models also import more models in their own right. Classes Submodel_1 to Submodel_n are generated from those imported models. All the above classes inherit class StateMachine.