Package com.thoughtworks.xstream.mapper
Class PackageAliasingMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.PackageAliasingMapper
- All Implemented Interfaces:
Mapper
,Serializable
Mapper that allows a package name to be replaced with an alias.
- See Also:
-
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
addPackageAlias
(String name, String pkg) private void
How a serialized class representation should be mapped back to a real class.serializedClass
(Class type) How a class name should be represented in its serialized form.private void
Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realMember, serializedMember, shouldSerializeMember
-
Field Details
-
REVERSE
-
packageToName
-
nameToPackage
-
-
Constructor Details
-
PackageAliasingMapper
-
-
Method Details
-
addPackageAlias
-
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
-
realClass
Description copied from interface:Mapper
How a serialized class representation should be mapped back to a real class.- Specified by:
realClass
in interfaceMapper
- Overrides:
realClass
in classMapperWrapper
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
ClassNotFoundException
-