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

public Class ClassAliasingMapper

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

Mapper that allows a fully qualified class name to be replaced with an alias.
Authors
Joe Walnes, Jörg Schaible

Field Summary

Modifier and TypeField and Description
private final Map<K, V>
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
addClassAlias(String name, Class<T> type)

public void
addClassAttributeAlias(String name, Class<T> type)

Deprecated As of 1.3, method was a leftover of an old implementation
public void
addTypeAlias(String name, Class<T> type)

public boolean
aliasIsAttribute(String name)

Deprecated As of 1.4.9
public boolean
itemTypeAsAttribute(Class<T> clazz)

Deprecated As of 1.4.9
private Object
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(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:
aliasForAttributealiasForAttributealiasForSystemAttributeattributeForAliasattributeForAliasdefaultImplementationOfgetConverterFromAttributegetConverterFromAttributegetConverterFromAttributegetConverterFromItemTypegetConverterFromItemTypegetConverterFromItemTypegetFieldNameForItemTypeAndNamegetImplicitCollectionDefForFieldNamegetItemTypeForItemFieldNamegetLocalConverterisIgnoredElementisImmutableValueTypeisReferenceablelookupMapperOfTyperealMemberserializedMembershouldSerializeMember

Field Detail

classToNameback to summary
private final Map<K, V> classToName
nameToTypeback to summary
private transient Map<K, V> nameToType
typeToNameback to summary
private final Map<K, V> typeToName

Constructor Detail

ClassAliasingMapperback to summary
public ClassAliasingMapper(Mapper wrapped)

Method Detail

addClassAliasback to summary
public void addClassAlias(String name, Class<T> type)
addClassAttributeAliasback to summary
public void addClassAttributeAlias(String name, Class<T> type)

Deprecated

As of 1.3, method was a leftover of an old implementation

addTypeAliasback to summary
public void addTypeAlias(String name, Class<T> type)
aliasIsAttributeback to summary
public boolean aliasIsAttribute(String name)

Deprecated

As of 1.4.9

itemTypeAsAttributeback to summary
public boolean itemTypeAsAttribute(Class<T> clazz)

Deprecated

As of 1.4.9

readResolveback to summary
private Object readResolve()
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(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.