Parts 1, 2 and 3 introduced StringTemplate through the use of simple SQL, HTML and plain text examples. This article switches gears and attempts to use StringTemplate to generate a more complicated text output: Java source code.
In “Effective Java: Second Edition” (go read it, no really go read it) Mr. Block puts forth the idea of using a “Builder” class...
on Jun 13, 2010
Please note: I put forth SQL examples because they can be short and are easy to understand. As other have pointed out it is not advisable to build SQL with Strings, regardless of the technique used.
What is StringTemplate?
To quote the StringTemplate home page:
“StringTemplate is a java template engine for generating source code...
on May 25, 2010