Douglas Jackson wrote:
> Ryan,
> The feature you are describing is a superclass for
> all generated classes not a superclass or interface
> for a particular class being generated. Unless I
> can use a superclass for each class that will not
> help.
> -Doug.
>
Right. I commented on this some more in a subsequent post:
> The <xjc:superClass> customization is a vendor extension of the RI - it is not
> described by the specification. As a JAXB provider, the RI can not modify the
> signatures of the interfaces generated by the binding compiler by adding 'extends'.
> However, we are allowed to modify the signatures of our implementation classes.
> The <xjc:superClass> customization adds an 'extends' on each of the generated
> classes. Perhaps in the next release we can allow finer grained control (ie -
> specify the customization on a per class basis rather than globally).
I suppose there are issues with this though. You wouldn't want to specify a
global superclass and a local superclass and wind up with a class trying to
extend two classes. We could have implemented this feature one way or the other,
but allowing both seems kind of tricky.
I still don't see how we could allow an "implements" customization on the generated
impl classes. The current specification does not define an extension mechanism
that allows you to "replace" or subclass the generated code. If we were to allow
such a customization today, you would have to compile your schema and then edit
the generated code before it could be used or even compiled.
The team frequently discusses this topic internally, so please continue to send us
your ideas and requirements so that we can explore adding them to the next major
release.
--Ryan