Hi Scott,
> Trying out the JAXB episodic compilation outlined here:
> (http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html).
> So far, works great. My setup is the following:
> Project A:
> JAXB Class A
> Project B (depends on Project A):
> JAXB Class B, which imports and refers to Class A
>
> Class A only gets in A.jar, and Class B only gets in B.jar. My problem
> however, is with certain XJC plugins that require ALL the classes to be
> in the model outline, like this one which handles Collection types very
> nicely:
> http://www.conspicio.dk/blog/bjarne/jaxb-xmlelementwrapper-plugin
>
> Some of my Collection classes are in Class A, but because Class A isn't
> in the outline passed into Plugin.run(Outline, Options, ErrorHandler),
> it doesn't know about it. It just iterates over outline.getClasses(),
> which now doesn't contain Class A classes.
>
> Trying to fix the plugin, but even then I can't find a way to
> either (a) iterate over the episodes being used in xjc, and/or (b)
> programatically add new CClassInfo objects for the classes in Class A
> (like CClassInfo.fromClass(Class c) ?).
Episodes are nothing but bindings which associate certain type with
"referenced" classes. So you can't actually iterate over episodes
since there's no such entity as "episode".
Referenced classes are modelled in model with
com.sun.tools.xjc.model.CClassRef, you can create and add it
programmatically. It's not CClassInfo though, but it's a CElement.
If you consider implementing your plugin in the frame of JAXB2 Basics,
I'll help you with code.
http://confluence.highsource.org/display/J2B/JAXB2+Basics+Plugins
Bye,
/lexi