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:16:43 -0800

Personally, I'd put a call to the doclet in my ant build script, so that xjc
gets invoked, then the bean generator doclet gets invoked.

-----Original Message-----
From: Adam Sherman [mailto:adam_at_tritus.ca]
Sent: Wednesday, October 29, 2003 11:05 AM
To: users_at_jaxb.dev.java.net
Subject: RE: Using JAXB Generated Classes as Beans

On 10/29/03 11:56:26 -0700 Geis, Matt wrote:

> 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.

This is a good approach, I like it.

Where, however, would your doclet tags reside? None of the classes exist
before xjc generation.

Thanks,

A.

-- 
Adam Sherman
Tritus CG Inc
+1 (613) 797-6819
http://www.tritus.ca/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net