users@jaxb.java.net

Re: Q: Does JAXB handle elements with minOccurs="0" correctly?

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 19 Nov 2004 11:40:38 -0800

Jacob Lauemøller wrote:
> I see your point, but couldn't you make it a customization feature for now and
> then maybe turn it into a 2.0 spec. feature? As I see it, it would just be a
> variation on the generateIsSetMethod property?

Yes. We can define an additional vendor-specific customization that does
what you proposed, I believe.

Please file an RFE for this. Let us think about it a bit more.

> Another great customization would be to have xjc generate constructors that
> took all required values (in addition to the empty default ctor). In this way
> it would be slightly easier to build JAXB stuctures programmatically. Right
> now I have to instantiate the right *Impl class and then invoke setters as
> needed. Perhaps emitting a seperate factory class instead of a ctor would be
> a better idea?

I can see that that could be useful.

I think Aleksei would say that this would be easy if you write an
add-on. Would you be interested in writing one? :-)

> Apart from this, JAXB works really well for us -- it's fast and much, much
> easier to use than e.g. the Axis generated classes. Keep up the good work!

Thanks.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net