Abstract
TextGen is a template engine framework for Java with Velocity-like syntax specifically designed for code generation based on difficult models. In TextGen you describe reusable transformations from your java model to text and files.
Features
- Templates:
- Common directives like if, for, etc.
- Powerful yet laconical and simple expression langugae with built-in
- List filtering
- List translating
- Recursive traversal
- Property-like access (xXX instead of getXXX(), setXXX(), isXXX())
- Good indentation handling
- Transformations:
- Transformation is chosen by object class and optional user-defined expression
- Can be:
- Text transformation for translating object to text
- File transformation for translating object to file with name specified by template
- Generator for translating object to set of different files