users@jaxb.java.net

Re: [Issue 115] Supports Method Chaining/ FluentAPI

From: Kohsuke Kawaguchi <kohsuke.kawaguchi_at_sun.com>
Date: Fri, 27 Jan 2006 13:39:39 -0800

Hanson Char wrote:
> Here you go:
>
> https://jaxb2-commons.dev.java.net/fluent-api/
>
> (Note the plugin snapshot jar can be downloaded from the same page.)

Nice!

I changed https://jaxb2-commons.dev.java.net/ and added a link to your
page. I'll blog about this.

Oh, I noticed one thing. You can do:

<taskdef name="xjc"
    classname="com.sun.tools.xjc.XJCTask">
  <classpath>
    <pathelement path="/path/to/jaxb-xjc.jar"/>
  </classpath>
</taskdef>

<xjc ...>
  <arg value="-Xfluent-api" />
  <classpath>
    <pathelement path="/path/to/jaxb-2.0-fluent-api-snapshot.jar" />
  </classpath>
  ...
</xjc>

instead of putting the plugins jar in the taskdef.


I need to extend XJC so that from command line, you can do:

   $ xjc ... -cp jaxb-2.0-fluent-api-snapshot.jar -Xfluentapi ...

(this doesn't work yet)

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com