Class DefaultImplementationsMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.DefaultImplementationsMapper
- All Implemented Interfaces:
Mapper
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultImplementation(Class defaultImplementation, Class ofType) protected voiddefaultImplementationOf(Class type) private ObjectserializedClass(Class type) How a class name should be represented in its serialized form.Methods inherited from class MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, realMember, serializedMember, shouldSerializeMember
-
Field Details
-
typeToImpl
-
implToType
-
-
Constructor Details
-
DefaultImplementationsMapper
-
-
Method Details
-
addDefaults
protected void addDefaults() -
addDefaultImplementation
-
serializedClass
Description copied from interface:MapperHow a class name should be represented in its serialized form.- Specified by:
serializedClassin interfaceMapper- Overrides:
serializedClassin classMapperWrapper
-
defaultImplementationOf
- Specified by:
defaultImplementationOfin interfaceMapper- Overrides:
defaultImplementationOfin classMapperWrapper
-
readResolve
-