com.thoughtworks.xstream.mapper
Class DefaultImplementationsMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.DefaultImplementationsMapper
- All Implemented Interfaces:
- 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 com.thoughtworks.xstream.mapper.MapperWrapper |
aliasForAttribute, aliasForAttribute, attributeForAlias, attributeForAlias, attributeForClassDefiningField, attributeForEnumType, attributeForImplementationClass, attributeForReadResolveField, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, isImmutableValueType, lookupMapperOfType, realClass, realMember, serializedMember, shouldSerializeMember |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultImplementationsMapper
public DefaultImplementationsMapper(Mapper wrapped)
DefaultImplementationsMapper
public DefaultImplementationsMapper(ClassMapper wrapped)
- Deprecated. As of 1.2, use
DefaultImplementationsMapper(Mapper)
addDefaults
protected void addDefaults()
addDefaultImplementation
public void addDefaultImplementation(java.lang.Class defaultImplementation,
java.lang.Class ofType)
serializedClass
public java.lang.String serializedClass(java.lang.Class type)
- Description copied from interface:
Mapper
- How a class name should be represented in its serialized form.
- Specified by:
serializedClass
in interface Mapper
- Overrides:
serializedClass
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/