users@jaxb.java.net

Re: Interfaces plugin

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 25 Sep 2006 15:48:02 -0700

Raymond Wold wrote:
> If this customization covers my need, the documentation needs a
> _serious_ rewrite. See:
> > This customization has no effect unless you are specifically
> > generating interfaces with the <globalBindings
> > generateValueClass="false" switch.
>
> I am not generating interfaces, which made me dismiss it entirely. I am
> generating classes, some of which have methods matching existing
> non-jaxb-related interfaces, and I'd like my generated classes to
> implement the interfaces out of the box, instead of having to write
> wrappers.

Indeed. I think this restriction doesn't apply any more. I removed that
part.


>> I second Lexi that I'd love to see this plugin hosted on jaxb2-commons,
>> but I respect your choice. I'll just put a pointer to yours from there
>> for now.
>
> As I said, anyone is free to put it up themself, when I say public
> domain I mean it, you're free to do whatever you want with "my" code (I
> just wrote it, I don't own it.) I just don't want the hassle of making
> shortcuts and such for a new place to store code, learning what not to
> do to mess things up, etc., using my own domain is convenient for me.

Understood.

>> I'm also curious about what your experience was with writing a plugin.
>> How long did it take? Was there anything we should have done better to
>> make it easier for you to write one? etc.
>
> Your blog really helped! :)
>
> The only thing I really lacked info on was the code model. Beyond the
> javadoc, I couldn't find any information on it. A few examples - either
> in a tutorial format, or just in the javadoc - would be nice. I was also
> surprised at the use of an integer flag argument "mods" used throughout,
> I have yett to find where the magic values are defined.

Thanks. I'll see if I can hack up some tutorial for codeModel.

The int constants are on JMods, BTW. But you are right that we really
shouldn't be using int. It's this backward compatibility thing.

> It's hard to estimate time used; I looked up information on how to write
> a plugin at the same time as searching for an existing way to fill my
> needs, besides working on other projects, over perhaps a week. The
> actual writing of the plugin took minutes.

Thanks. That's encouraging.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com