Top Description Fields Constructors Methods
com.thoughtworks.xstream.mapper

public Class DefaultImplementationsMapper

extends MapperWrapper
Class Inheritance
Imports
com.thoughtworks.xstream.InitializationException, java.util.HashMap, .Iterator, .Map

Mapper that resolves default implementations of classes. For example, mapper.serializedClass(ArrayList.class) will return java.util.List. Calling mapper.defaultImplementationOf(List.class) will return ArrayList.
Author
Joe Walnes

Field Summary

Modifier and TypeField and Description
private transient Map<K, V>
private final Map<K, V>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addDefaultImplementation(Class<T> defaultImplementation, Class<T> ofType)

protected void
public Class<T>
private Object
public String
serializedClass(Class<T> type)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.serializedClass.

Implements com.thoughtworks.xstream.mapper.Mapper.serializedClass.

How a class name should be represented in its serialized form.
Inherited from com.thoughtworks.xstream.mapper.MapperWrapper:
aliasForAttributealiasForAttributealiasForSystemAttributeattributeForAliasattributeForAliasgetConverterFromAttributegetConverterFromAttributegetConverterFromAttributegetConverterFromItemTypegetConverterFromItemTypegetConverterFromItemTypegetFieldNameForItemTypeAndNamegetImplicitCollectionDefForFieldNamegetItemTypeForItemFieldNamegetLocalConverterisIgnoredElementisImmutableValueTypeisReferenceablelookupMapperOfTyperealClassrealMemberserializedMembershouldSerializeMember

Field Detail

implToTypeback to summary
private transient Map<K, V> implToType
typeToImplback to summary
private final Map<K, V> typeToImpl

Constructor Detail

DefaultImplementationsMapperback to summary
public DefaultImplementationsMapper(Mapper wrapped)

Method Detail

addDefaultImplementationback to summary
public void addDefaultImplementation(Class<T> defaultImplementation, Class<T> ofType)
addDefaultsback to summary
protected void addDefaults()
defaultImplementationOfback to summary
public Class<T> defaultImplementationOf(Class<T> type)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.defaultImplementationOf.

Implements com.thoughtworks.xstream.mapper.Mapper.defaultImplementationOf.

readResolveback to summary
private Object readResolve()
serializedClassback to summary
public String serializedClass(Class<T> type)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.serializedClass.

Implements com.thoughtworks.xstream.mapper.Mapper.serializedClass.

Doc from com.thoughtworks.xstream.mapper.Mapper.serializedClass.

How a class name should be represented in its serialized form.