Statechart-to-Java

With the Statechart-to-Java Plug-in you can directly generate java code from a UML state diagram that describes the behavior of a class. So in addition to the static structure of the class — i.e. operations, attributes and associations — the dynamic behavior is generated as java code.This unique module enables you to visualize, test and even manipulate the behavior of objects using their corresponding state diagrams. The visualization is based on pure UML, just adding some color and action.

The triggers in the state chart are mapped to ordinary operations of a class. The behavior of these operations is determined by the actions that are specified in entry and exit actions of states and as effects of transitions in state charts.

In order to validate the semantics of the specified behavior, the Statechart-to-Java Plug-in allows you to run a simulation in which state diagrams can be instantiated. The generated java code of a class assures that by creating an object that owns a state chart, its state chart diagram is simulated graphically. You can send triggers to these objects and step through the various states that are defined in the state chart diagram. By dealing with several objects, you can validate not only the intra-object behavior of one object, but also the inter-object behavior.