APT-Jelly, an engine for generating artifacts (e.g. source code, config files) from Java source code, now fully supports a true templating engine, Freemarker, as an interface to Sun's Annotation Processing Tool (APT). You don't have to fully swallow Sun's Mirror API to generate artifacts (e.g. config files, source code) from Java source code, nor do you have to be consigned to use one of the other code generation engines (e.g. XDoclet) that doesn't support the latest Java 5 syntax and features, including metadata (annotations), generics and typesafe enums. Rather, just use a Freemarker template.