users@jaxb.java.net

Help with the code-injector plugin, or code injection in general

From: dan twining <dantwining_at_gmail.com>
Date: Thu, 12 May 2011 15:38:05 +0100

Hello jaxb users,

I'm struggling to find out information about the code-injector plugin (
http://jaxb.dev.java.net/plugin/code-injector), and was wondering if anyone
could help. I'm using it to add behaviour to my jaxb-generated classes, and
would like to know if/how I can inject imports as part of what's added.

A bit of background: we use XML to define our shared data objects, and then
and XJB and jaxb to generate objects from that XML. In the past, we've then
mapped those value objects, using Dozer, to "proper" objects that have both
state and behaviour.

What I'm trying to do is skip the Dozer step, and have jaxb generate proper
objects in the first place. The code-injector plugin seems like a really
good way to do this, but I don't know if I can add imports as part of the
process. I guess I could use fully-qualified class names, but that doesn't
seem quite right.

Any help you can give would be most appreciated.

Thanks,
Dan