Eddie Benowitz <eddieb_at_mail2.jpl.nasa.gov> wrote:
> Just a comment:
>
> It seems to me that for any element having minOccurs="0"
> then the isSet method should automatically be generated.
> Likewise, for min occurs greater than zero, the isSet method
> is less critical and need not be generated. This could be decided
> by xjc rather than the current more manual process of identification by
> specifying generateIsSetMethod="true".
The RI certainly keeps enough information to do this kind of
optimizations, but this is a spec issue,
Even when minOccurs=0, there are cases where the isSet method is
unnecessary (such as when the type of a field is a reference type, etc.
) Speaking for myself, I feel that this has a rather expensive
specification cost compared to its benefit.
On a related topic, I made a change to the RI so that its javadoc will
say whether a field is mandatory or optional. So I hope that helps.
regards,
--
Kohsuke Kawaguchi 408-276-7063 (x17063)
Sun Microsystems kohsuke.kawaguchi_at_sun.com