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

public Class PackageAliasingMapper

extends MapperWrapper
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, .Serializable, java.util.Comparator, .HashMap, .Iterator, .Map, .TreeMap

Mapper that allows a package name to be replaced with an alias.
Author
Jörg Schaible

Field Summary

Modifier and TypeField and Description
protected transient Map<K, V>
private Map<K, V>
private static final Comparator<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
private void
public Class<T>
realClass(String elementName)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.realClass.

Implements com.thoughtworks.xstream.mapper.Mapper.realClass.

How a serialized class representation should be mapped back to a real class.
public String
serializedClass(final 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.
private void
Inherited from com.thoughtworks.xstream.mapper.MapperWrapper:
aliasForAttributealiasForAttributealiasForSystemAttributeattributeForAliasattributeForAliasdefaultImplementationOfgetConverterFromAttributegetConverterFromAttributegetConverterFromAttributegetConverterFromItemTypegetConverterFromItemTypegetConverterFromItemTypegetFieldNameForItemTypeAndNamegetImplicitCollectionDefForFieldNamegetItemTypeForItemFieldNamegetLocalConverterisIgnoredElementisImmutableValueTypeisReferenceablelookupMapperOfTyperealMemberserializedMembershouldSerializeMember

Field Detail

nameToPackageback to summary
protected transient Map<K, V> nameToPackage
packageToNameback to summary
private Map<K, V> packageToName
REVERSEback to summary
private static final Comparator<T> REVERSE

Constructor Detail

PackageAliasingMapperback to summary
public PackageAliasingMapper(final Mapper wrapped)

Method Detail

addPackageAliasback to summary
public void addPackageAlias(String name, String pkg)
readObjectback to summary
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException
realClassback to summary
public Class<T> realClass(String elementName)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.realClass.

Implements com.thoughtworks.xstream.mapper.Mapper.realClass.

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

How a serialized class representation should be mapped back to a real class.

serializedClassback to summary
public String serializedClass(final 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.

writeObjectback to summary
private void writeObject(final ObjectOutputStream out) throws IOException