DomainModelingCodeGeneration
There is very little code that can be generated when we restrict the UML to match 1:1 to language constructs. UML classes can generate Java classes, operations can generate methods, and attributes can generate data members. In order to start generating more robust code, the code generation mechanism must be aware of domain constructs. The concept is to move design patterns from the design center, and put them directly into the code generation mechanism.
The template management system should be extensible. In other words the template system should allow the user to create new templates and add them to the code generation processing. It is easy to see that a user can have two or more templates that handle the same domain type. For example the user may have templates that generate persistence code for JDBC, EJB, JPA, etc. The user may not want all of the templates to be executed for all projects, so each UML project should allow the user to specify the templates that should be executed during code generation.
Example A class model element may be tagged as a persistence object. A persistence type is a domain type that means different things in different domains. Some example domains would be JDBC, EJB, JPA, etc. The template that is used to generate code would determine the type of persistence logic that is generated.
The user should also be able to specify the conditions in which a template can be executed. In the above example, the persistence templates would only be executed if a class model element has the "persistence" stereotype.
Must Have Features
- Allow users to create new templates and add the new templates to the code generation feature (99406).
- Allow users to specify the templates that are executed during code generation (99423).
- Allow users to specify the conditions that will cause the template to execute(99424).

