Package com.thoughtworks.xstream.mapper
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 com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefaultImplementation
(Class defaultImplementation, Class ofType) protected void
defaultImplementationOf
(Class type) private Object
serializedClass
(Class type) How a class name should be represented in its serialized form.Methods inherited from class com.thoughtworks.xstream.mapper.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:Mapper
How a class name should be represented in its serialized form.- Specified by:
serializedClass
in interfaceMapper
- Overrides:
serializedClass
in classMapperWrapper
-
defaultImplementationOf
- Specified by:
defaultImplementationOf
in interfaceMapper
- Overrides:
defaultImplementationOf
in classMapperWrapper
-
readResolve
-