Chisarick, Dan wrote:
> Hi. I've read through the FAQ, the specification, and a bunch of the
> mailing list archives. I realize that the JAXB v1.x generated
> interfaces were done away with, and I understand the motivation. Still,
> there's this small matter of a few thousand references to those
> interfaces in our existing code base. It's just not practical to
> migrate them all right now.
Right.
> At least as a transitional step, I'd like to generate those interfaces
> just so the code compiles and work can continue identifying the
> feasibility of moving to JAXB2. A plug-in seems to be the approach to
> take.
Actually, if you just need to do the old interface/impl style split, you
could just use the stock customization. <jaxb:globalBindings
generateValueClass="false"/>
I think Lexi addressed the rest of the questions.
> Currently I have a development project open where I have a
> skeletal plugin that just prints out stuff like the target directory for
> class generation, the class type name and it's package name. Ok, good
> so far. Here's what I (think I) still need to do:
>
> 1) Set an additional interface for each generated class. Assuming "co"
> is a ClassOutline instance, this seems to work:
>
> co.implClass._implements(MyNewInterface.class);
>
> Unfortunately that only works for interface classes that already exist.
> Since I'm generating them dynamically, that doesn't work too well. I
> see there's an overloaded method that takes a JClass, but the means for
> creating one is sending me in circles.
>
> Question 1: How can I specify the name of an interface for a JAXB
> generated class when that interface does not exist? I'd like to be able
> to specify the interface simply as a String if possible.
>
> 2) In order to generate the interface, I need to know the public methods
> of each generated class. Any pointers on how I can retrieve that
> information starting w/a ClassOutline instance?
>
> I am a little new to the internals of JAXB2 so if what I'm trying to do
> (discouraged though it may be) has already been addressed somewhere, I
> missed it. Thanks.
>
> Dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: dev-help_at_jaxb.dev.java.net
>
>
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com