Re: [xstream-user] Overriding Map Converter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [xstream-user] Overriding Map Converter

On 14/10/05, Joe Walnes <[hidden email]> wrote:

> On 10/12/05, [hidden email] <[hidden email]> wrote:
> > I understand I can create our own version, and register it using
> > xstream.registerConverter().  However, won't that leave me with 2
> > converters that know how to convert what's defined in the canConvert
> > method, which will be identical for both (the XStream MapConverter and our
> > xxxMapConverter)?
> >
> > How do I know which one will be used?  And set things up so that ours is
> > used?
> XStream will always use the most recently registered converter first
> (unless you've explicitly stated a different priority).

Perhaps this should be added to the Javadoc for registerConverter()?

Might also be useful to document PRIORITY_NORMAL,  _LOW and _VERYLOW ...