com.thoughtworks.xstream.mapper
Class DefaultImplementationsMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.DefaultImplementationsMapper
- All Implemented Interfaces:
- ClassMapper, Mapper
- public class DefaultImplementationsMapper
- extends MapperWrapper
Mapper that resolves default implementations of classes. For example, mapper.lookupName(ArrayList.class) will return
java.util.List. Calling mapper.defaultImplementationOf(List.class) will return ArrayList.
- Author:
- Joe Walnes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultImplementationsMapper
public DefaultImplementationsMapper(ClassMapper wrapped)
addDefaults
protected void addDefaults()
addDefaultImplementation
public void addDefaultImplementation(java.lang.Class defaultImplementation,
java.lang.Class ofType)
lookupName
public java.lang.String lookupName(java.lang.Class type)
- Specified by:
lookupName
in interface ClassMapper
- Overrides:
lookupName
in class MapperWrapper
defaultImplementationOf
public java.lang.Class defaultImplementationOf(java.lang.Class type)
- Specified by:
defaultImplementationOf
in interface Mapper
- Overrides:
defaultImplementationOf
in class MapperWrapper
Joe Walnes, http://xstream.codehaus.org/