Set the auto-detection mode of XStream.
Set the types to use XML attributes for. The given map can contain either <String, Class> pairs, in which case XStream.useAttributeFor(String, Class) is called, or <Class, String> pairs, which results in XStream.useAttributeFor(Class, String) calls.
Note that auto-detection implies that the XStream is configured while it is processing the XML steams, and thus introduces a potential concurrency problem.