users@jaxb.java.net

deriving from JAXB2 generated classes

From: James Strachan <james.strachan_at_gmail.com>
Date: Thu, 23 Nov 2006 18:20:53 +0000

I know we can provide base classes for JAXB2 POJOs, I'd actually like
to go the other way, and occasionally derive from JAXB2 POJOs and use
the derivations by default on all parsing/marshalling stuff.

I know I can derive from ObjectFactory and write my own custom one. I
was kinda wondering if there was some way to kinda get the JAXB2 XJC
to generate - if I flipped some switch - an ObjectFactorySupport that
I can then derive from to implement my own custom ObjectFactory
implementation - so that it'd be kinda invisible that I'd used a
custom ObjectFactory - so there'd be no need to do custom JAXBContext
stuff etc? i.e. I could kinda wire in derived classes to the JAXB2
generated code.

I wonder has anyone done something like this?
-- 
James
-------
http://radio.weblogs.com/0112098/