UML class diagram and Java source code are interrelated and Java code is a kind of interchange format. Working with UML state diagram in CASE tools, a corresponding xml file is maintained. Designing state diagrams is mostly performed manually using design patterns and coding templates - a time consuming process. This article demonstrates how to compile such a diagram into Java code and later, by reverse engineering, produce a class diagram. The process from state diagram via intermediate SAX parsed xml file to Apache Velocity generated Java code is described. The result is a fast reproducible Java code minimizing maintenance.
|Journal||Information and Software Technology|
|Number of pages||20|
|Publication status||Published - 2009|
- UML state diagram design, Java code generation, SAX parser, Apache Velocity Template Language, xml