users@jaxb.java.net

Re: Mod change in MethodWriter.declareMethod

From: <HeruMartinus.Salim_at_infineon.com>
Date: Tue, 21 Nov 2006 16:35:27 +0100

> > It doesn't make sense to have such method, because
> MethodWriter is for
> > abstracting away the difference between interface/impl vs beans
> > generation style.
> >
> > You cannot define any non-public stuff on interfaces.
> >
> > If the goal is to define methods just on impl classes or value
> > classes, you should be using JMethod and JDefinedClass directly, as
> > Lexi explained.
> >
>
> What should I do if I want to define additional enum on impl
> classes, which will be used by the beans generation?
> Because the beans generation (onActivated method) is done
> before the impl class (run method), I couldn't get the enum I
> added to the impl classes from the beans generator.
>
> Can I change the way it works? Or are there any other ways?
> Or can I add the enum on the fieldRenderer scope?
>
> Regards,
> Heru

Do you think it's a good Idea if I "rewrite" the
com.sun.tools.xjc.model.Model or com.sun.tools.xjc.generator.bean.Bean
to achieve it?

Thanks

Heru