users@jaxb.java.net

Disabling normal Java class generation?

From: Joel Sacks <sacks_at_btmmr.com>
Date: Mon, 13 Oct 2008 16:10:30 -0700

Hello-

 

I'm trying to write a plugin for jaxb that will generate ActionScript
classes instead of Java classes, and I'm making some progress, but I haven't
figured out how to keep it from generating the Java classes. I found that
if I run jaxb inside Eclipse, it uses a "driver" that honors a flag called
"-mode", and I can supply "dryrun" as the parameter, and that does the
trick, but it doesn't work when running with the Ant task. It seems that
this is because the Ant task hooks in differently, and doesn't process the
driver-specific options. Is there another way to approach this?

 

For example, I'm connecting my plugin to JAXB at the "run" method, which
means I get called after the outline has been generated. Is there another
way to hook in that might completely replace the Java class generation?
Currently I have to loop through the classes and generate my own files, but
it would be cleaner if there was an interface that let me do things at a
per-file level. That way I could disable the Java file generation as well
as skip the outermost loop. Is there such a thing? Thanks.

 

-Joel