users@jaxb.java.net

Re: Implementing Generation Gap Pattern

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 15 Jun 2011 21:12:51 +0200

Hi,

> An extension to the schema would generate and overwrite any manual changes,
> which would indeed be a pain. The idea is to have the subclasses maintained
> manually (in a different source tree) without risking overwrites. The code
> injector example
> (http://www.java.net/blog/kohsuke/archive/2005/06/writing_a_plugi.html) is
> an option but only for very small amounts of code that hardly ever change.
> Otherwise I'd prefer to have some IDE support.
>
> But even if the 'why' is marginally relevant, I consider this an opportunity
> to gain some new JAXB knowledge: toying around with the plugin api already
> provided some, but knowing where to 'hook into' the code would help. There
> seems to be little documentation and the JavaDoc seems to be primarily aimed
> at those familiar with the code.

Check source code of JAXB2 Basics and Hyperjaxb3. These projects have
examples of very advanced usage of the XJC APIs.

Best wishes,
/lexi