users@jaxb.java.net

Re: csv xjc plugin

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 14 Jun 2006 23:19:18 -0700

jason white wrote:
> All, I am writing an xjc plugin which takes an xsd, which I create from
> looking at a csv file, and generates the appropriate code...
>
> I need to be able to intercept the code generation, hence the plugin, and
> replace the @xmlelement annotation with a custom one i have created
> "@csvXXX"...
>
> I am not really able to find anything like JFieldVar.deAnnotate but am
> curious if anyone out there might have seen something like this before?

You can't really replace those annotations right now, but you can add
new annotations by using methods defined on JAnnotatable.

Notice that JFieldVar inherits JAnnotatable.

If your goal is to create a databinding solution for CSV, then I don't
think you really need to build it on top of the JAXB RI. I think you can
just write a quick compiler directly on top of CodeModel.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com