StringTemplate is a java template engine (with ports for C# and Python) for generating source code, web pages, emails, or any other formatted text output.
A template engine is a code generator that emits text using templates embedded with actions or data references. Engines generally espouse a model-view pattern in an attempt to separate the data source and template. A container such as a Servlet web server may act as a controller, orchestrating instantiation and controlling model-view interaction.
StringTemplate has spawned a number of engines:
ANTES template engine by Scott Dixon