Actually, we need this same feature too... vote +1, if that helps in
prioritizing? (Not the "Ability to modify generated methods" in
general, but JAXB beans with PropertyChangeListener support in
particular.)
Another approach could be some AOP thing, instead of in the JAXB
generation. Not an option for you? E.g. like on
http://www.eclipse.org/aspectj/doc/released/progguide/examples-production.html,
and
http://today.java.net/pub/a/today/2005/12/15/writing-mixins-with-aop.html
(or other articles with the very same idea for different AOP
frameworks than AspectJ, e.g. same with JBossAOP on
http://www.damnhandy.com/?page_id=17)
Or has there been progress on a JAXB Plugin/option for this already? ;-)
Generating the src code from JAXB would be easiest to work with during
dev, IMHO.
> Regarding your PropertyChangeListener, it would be somewhat difficult to
> fire an event for a change to List, as it happens outside the knowledge
> of JAXB.
You'd probably have to wrap the returned list, then it would be
possible? This would be required whether its AOP or JAXB src gen.
On 6/10/06, Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_sun.com> wrote:
> Dmitri Colebatch wrote:
> > That's ok - I started digging around there earlier. Is my previous
> > thinking (making ImplStructureStrategy abstract) along reasonable
> > lines? If you're not sure off the top of your head then don't worry
> > with an answer, I'll try to fumble my way around myself.
>
> The good place to start would be FieldRendererFactory. This is the root
> of the object that controls the entire accessor/field generations, and
> thus a good hook if you need to inject code on every setter method.
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems kohsuke.kawaguchi_at_sun.com
>
>
>
--
Michael Vorburger
MAIL: mike_at_vorburger.ch
HOME: http://www.vorburger.ch/ (NEW!)
POTS: +41 (78) 805 55 41