> Hi, Kohsuke,
>
> sorry for replying late. First of all, thanks for your answers, but I must
> admit, that I still cannot follow:
>
> Kohsuke Kawaguchi wrote:
>
> > So the compiler is trying to create the following relationship
> >
> > MyClassImpl -> (your) SomeClass -> SomeClass (which is usually
> > generated as MyClassTypeImpl but you changed i by class/_at_name.)
>
> Sorry for not working this out myself. May I still ask for the general idea,
> though? Assuming that my SomeClass is indeed generated by some external
> tool, it is unlikely that I can make it derive from a class generated by JAXB.
Good point. You are right. I personally agree that there's a portability
issue around implClass.
Either you have to implement your class from scratch (which is
impossible to do unless you tie your code to a particular JAXB
implementation), or you have to extend your class from the generated
one (which is also impossible to do unless you tie your code to ... )
> > If you want to change the implClass of element, attach your annotation
> > to the element.
>
> Quoting 6.7.3.4:
>
> A <class> declaration is allowed in the annotation element of the
> global element declaration. However, the implClass attribute is
> not allowed.
>
> My interpretation is that attaching the annotation to the element is
> forbidden. Not that I understand why ... but perhaps you are saying me that
> this works anyways? :-)
Ahhh, you are right. Hmm. I'll ask the spec team to answer your question.
regards,
--
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