Hi.
> 1) How can I add more package imports to the beginning of the generated
> class, so I don't need to refer to the fully qualified class names in
> the methods ?
You can't do that.
> 2) Is it common practice to pass additional config info to running the
> xjc plugin, so it can, say, generate toString using different
> ToStringStyle, or whether a toXml() should be generated or not, etc. ?
> If so, is System properties to way to go, or there is a better way ?
Please check AbstractParameterizablePlugin from hyperjaxb3-tools.
This plugin parses command-line options provided by XJC and injects values into
the plugin as via bean properties (it uses Jakarta Commons BeanUtils for that).
This makes writing parameterizable plugins really easy, you just need to declare
a setter and if the arg is there, it will be converted/passed to the setter
automatically.
Bye.
/lexi