ONJava.com: Code-Generation Techniques for Java: "Code-Generation Techniques for Java
by Jack Herrington
Working in Java either means writing a little bit of complex code or writing a lot of gruntwork code. J2EE is a prime example; implementing the persistence for a single database table takes five classes and two interfaces using EJBs, and almost all of the classes are clerical work. We have to write them, but we don't have to do it by hand. Code-generation techniques can make building high-quality EJB code a breeze."
An even older article than the last one about code genertion (by the same author). Page 2 covers XDoclet