users@jaxb.java.net

RE: Using JAXB Generated Classes as Beans

From: Geis, Matt <Matt.Geis_at_schwab.com>
Date: Wed, 29 Oct 2003 11:56:26 -0700

Another approach (which would require some custom code generation of your
own, maybe using a doclet) would be to make a wrapper class. The
constructor for the wrapper bean would use the ObjectFactory to create an
instance of the JAXB class, and use it as a delegate. The wrapper bean
would also implement the generated JAXB interface.

You would have to write not only the constructor, but an implementation for
each method in the interface. However, that's pretty easy, as it's just a
passthrough to the JAXB implementation class you're using as a delegate.

The real work is in writing the doclet, but once you have that down, you've
got a portable tool.

Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net