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

public Class OuterClassMapper

extends MapperWrapper
implements Caching
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.core.Caching
Imports
java.lang.reflect.Field, java.util.Collections, .HashMap, .Map, com.thoughtworks.xstream.core.Caching

Mapper that uses a more meaningful alias for the field in an inner class (this$0) that refers to the outer class.
Author
Joe Walnes

Field Summary

Modifier and TypeField and Description
private final String
private static final String[]
private final Map<K, V>

Constructor Summary

AccessConstructor and Description
public
public
OuterClassMapper(Mapper wrapped, String alias)

Method Summary

Modifier and TypeMethod and Description
public void
private String[]
getInnerFieldNames(final Class<T> type)

public String
realMember(Class<T> type, String serialized)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.realMember.

Implements com.thoughtworks.xstream.mapper.Mapper.realMember.

How a serialized member representation should be mapped back to a real member.
public String
serializedMember(Class<T> type, String memberName)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.serializedMember.

Implements com.thoughtworks.xstream.mapper.Mapper.serializedMember.

How a class member should be represented in its serialized form.
Inherited from com.thoughtworks.xstream.mapper.MapperWrapper:
aliasForAttributealiasForAttributealiasForSystemAttributeattributeForAliasattributeForAliasdefaultImplementationOfgetConverterFromAttributegetConverterFromAttributegetConverterFromAttributegetConverterFromItemTypegetConverterFromItemTypegetConverterFromItemTypegetFieldNameForItemTypeAndNamegetImplicitCollectionDefForFieldNamegetItemTypeForItemFieldNamegetLocalConverterisIgnoredElementisImmutableValueTypeisReferenceablelookupMapperOfTyperealClassserializedClassshouldSerializeMember

Field Detail

aliasback to summary
private final String alias
EMPTY_NAMESback to summary
private static final String[] EMPTY_NAMES
innerFieldsback to summary
private final Map<K, V> innerFields

Constructor Detail

OuterClassMapperback to summary
public OuterClassMapper(Mapper wrapped)
OuterClassMapperback to summary
public OuterClassMapper(Mapper wrapped, String alias)

Method Detail

flushCacheback to summary
public void flushCache()

Implements com.thoughtworks.xstream.core.Caching.flushCache.

getInnerFieldNamesback to summary
private String[] getInnerFieldNames(final Class<T> type)
realMemberback to summary
public String realMember(Class<T> type, String serialized)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.realMember.

Implements com.thoughtworks.xstream.mapper.Mapper.realMember.

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

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

serializedMemberback to summary
public String serializedMember(Class<T> type, String memberName)

Overrides com.thoughtworks.xstream.mapper.MapperWrapper.serializedMember.

Implements com.thoughtworks.xstream.mapper.Mapper.serializedMember.

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

How a class member should be represented in its serialized form.