Originally posted by Dave Hewy:
So my question is, does XDoclet provide a mechanism to allow custom code to be added and preserved upon further generation?
XDoclet provides what are called "merge points" in the various templates. These are places in the template that include another custom template. The included template is named based on the type of object being generated or the class, depending on the particular merge point. As well, the templates are simply text files packaged into the various XDoclet JARs, and there is a mechanism to use your own templates instead.
Finally, all generated files get token-replacement treatment, so you can include regular
Ant properties in your source code and have the values replaced at build time.
So far this has worked quite well for me. I've used XDoclet to build a medium-sized
EJB project (30 or so entity, session and message-driven beans), and another developer here that converted to using XDoclet has been quite pleased too.