users@jaxb.java.net

Re: ValidationEventHandler returns only parent object through ValidationEvent.getLocator().getObject()

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 04 Oct 2004 09:51:36 -0700

jon gold wrote:
> that actually looks very nice to me -- using annotations. i was going to
> look around more to see if you could really use annotations to do things
> like that (i still haven't been able to play around with 1.5 yet).

Good. Yes, it's actually quite easy to define your own annotations and
to write the code to read annotations. Then, the rest is just a matter
of doing some reflection work.

> incidentally -- yes, it would be easier to do them in the java classes,
> but i don't generate the java classes, xjc does (is that what you mean
> by "specify constraints outside the source file"?).

Yes. Or if a reasonable set of annotations are defined, XJC or Aleksei's
add-on might be able to generate those annotations from schema.


> i suppose with jaxb 2.0, though, that won't be the case, so i'll be able
> to bind my own classes to schema, and then, supposedly, do what's below.

That's exactly what I had in my mind.

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