6 Minute Video: Groovy Makes Code Generation Simple
By Geertjan-Oracle on Oct 28, 2008
The text right at the end, which disappears as soon as you see it, says: "That's all folks. Have fun with Groovy! Clearly it makes code generation a piece of cake, not just for files, but even for complete source structures!"
Go here to download the screencast for off-line viewing.
The basic principles outlined above have several implications that I don't I go into in the screencast, but will do so next time. However, I'm sure there's more than enough in there to give anyone a couple of interesting ideas.