users@jaxb.java.net

Re: parameterizing attributes

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 30 May 2006 12:09:22 -0700

Alec Swan wrote:
> I think what I said about XmlJavaTypeAdapter is wrong. The adapter does
> fire every time a getter or a setter method is invoked on the element,
> which is good. However, the adapter does not apply to each element of a
> collection before the collection is returned, which is bad. Is there a
> way to instruct JAXB to do that?

I think there's a bug filed for this.

> Also, when XmlJavaTypeAdapter it does not contain any information about
> the context it was fired in. Is there a way to get ahold of the instance
> on which the getter or setter method was invoked, which caused the
> adapter to fire?

I'm not exactly sure what you mean (and I didn't quite follow your
original use case anyway), but perhaps you might find "3.4.2. Pair
property" in https://jaxb.dev.java.net/guide/ useful?


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com