The ToStringStyle can now be optionally specified (in the latest CVS) via an
optional command line argument.
Example:
-Xcommons-lang:ToStringStyle=SIMPLE_STYLE
Will update the web site shortly. And thanks to the Jaxb team for all the
nice and hard work.
Merry X'mas,
Hanson
On 10/28/06, Hanson Char <hanson.char_at_gmail.com> wrote:
>
> Hi Kenny,
>
> Thanks for the suggestion. I'll look into it when I got a chance.
>
> Hanson
>
> On 10/27/06, Kenny MacLeod <kennym_at_kizoom.com> wrote:
> > Hi Hanson. May I suggest yet another impertinent enhancement on one of
> > your plugins? :-)
> >
> > In the case of the generated equals method, the plugin could take an
> > option parameter in XJC which indicates the static field which is a
> > reference to the ToStringStyle you want to use, in a similar way to
> > xjc:javaType takes references to print and parse static methods in a
> > binding customisation. If the option isn't supplied, then just fallback
> > to the default style.
> >
> > Alternatively, or even additionally, you could generate an additional
> > toString() method which takes a ToStringStyle parameter, which would
> > allow you to override it at runtime.
> >
> > The reason I suggest these is that it's notoriously trickly to pick a
> > ToStringStyle that works with every object model and every application.
> >
>