Top Fields Constructors Methods
com.thoughtworks.xstream.mapper

public abstract Class MapperWrapper

extends Object
implements Mapper
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.mapper.Mapper
Known Direct Subclasses
com.thoughtworks.xstream.mapper.OuterClassMapper, com.thoughtworks.xstream.mapper.PackageAliasingMapper, com.thoughtworks.xstream.mapper.SecurityMapper, com.thoughtworks.xstream.mapper.AbstractAttributeAliasingMapper, com.thoughtworks.xstream.mapper.AbstractXmlFriendlyMapper, com.thoughtworks.xstream.mapper.AnnotationMapper, com.thoughtworks.xstream.mapper.ArrayMapper, com.thoughtworks.xstream.mapper.AttributeMapper, com.thoughtworks.xstream.mapper.CachingMapper, com.thoughtworks.xstream.mapper.CGLIBMapper, com.thoughtworks.xstream.mapper.ClassAliasingMapper, com.thoughtworks.xstream.mapper.DefaultImplementationsMapper, com.thoughtworks.xstream.mapper.DynamicProxyMapper, com.thoughtworks.xstream.mapper.ElementIgnoringMapper, com.thoughtworks.xstream.mapper.EnumMapper, com.thoughtworks.xstream.mapper.FieldAliasingMapper, com.thoughtworks.xstream.mapper.ImmutableTypesMapper, com.thoughtworks.xstream.mapper.ImplicitCollectionMapper, com.thoughtworks.xstream.mapper.LambdaMapper, com.thoughtworks.xstream.mapper.LocalConversionMapper
Imports
java.lang.reflect.Method, java.util.HashMap, .Map, com.thoughtworks.xstream.converters.Converter, .SingleValueConverter

Field Summary

Modifier and TypeField and Description
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper
private final Mapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
aliasForAttribute(String
the attribute
attribute
)

Implements com.thoughtworks.xstream.mapper.Mapper.aliasForAttribute.

Get the alias for an attribute's name.
public String
aliasForAttribute(Class<T>
the type where the field was defined
definedIn
,
String
the field name
fieldName
)

Implements com.thoughtworks.xstream.mapper.Mapper.aliasForAttribute.

Returns an alias for a single field defined in an specific type.
public String
aliasForSystemAttribute(String
the system attribute
attribute
)

Implements com.thoughtworks.xstream.mapper.Mapper.aliasForSystemAttribute.

Get the alias for a system attribute's name.
public String
attributeForAlias(String
the alias
alias
)

Implements com.thoughtworks.xstream.mapper.Mapper.attributeForAlias.

Get the attribute's name for an alias.
public String
attributeForAlias(Class<T>
the type where the field was defined
definedIn
,
String
the alias
alias
)

Implements com.thoughtworks.xstream.mapper.Mapper.attributeForAlias.

Deprecated As of 1.3, use combination of realMember(Class, String) and getConverterFromItemType(String, Class, Class)
Returns the field name for an aliased attribute.
public Class<T>
public SingleValueConverter
public SingleValueConverter
getConverterFromAttribute(Class<T>
the field's parent
type
,
String
the attribute name
attribute
)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

Returns which converter to use for an specific attribute in a type.
public SingleValueConverter
getConverterFromAttribute(Class<T>
the field's parent
definedIn
,
String
the attribute name
attribute
,
Class<T>
the type the converter should create
type
)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

Returns which converter to use for an specific attribute in a type.
public SingleValueConverter
public SingleValueConverter
public SingleValueConverter
getConverterFromItemType(String
the field name
fieldName
,
Class<T>
the field type
type
,
Class<T>
the type which defines this field
definedIn
)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

Returns a single value converter to be used in a specific field.
public String
getFieldNameForItemTypeAndName(Class<T>
owning type
definedIn
,
Class<T>
item type
itemType
,
String
optional item element name
itemFieldName
)

Implements com.thoughtworks.xstream.mapper.Mapper.getFieldNameForItemTypeAndName.

Get the name of the field that acts as the default collection for an object, or return null if there is none.
public Mapper.ImplicitCollectionMapping
public Class<T>
public Converter
public boolean
isIgnoredElement(String name)

Implements com.thoughtworks.xstream.mapper.Mapper.isIgnoredElement.

Whether this name can be ignored.
public boolean
isImmutableValueType(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.isImmutableValueType.

Whether this type is a simple immutable value (int, boolean, String, URL, etc).
public boolean
isReferenceable(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.isReferenceable.

Whether this type is referenceable in a stream.
public Mapper
public Class<T>
realClass(String elementName)

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

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

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

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

Implements com.thoughtworks.xstream.mapper.Mapper.serializedClass.

How a class name should be represented in its serialized form.
public String
serializedMember(Class<T> type, String memberName)

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

How a class member should be represented in its serialized form.
public boolean
shouldSerializeMember(Class<T> definedIn, String fieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.shouldSerializeMember.

Determine whether a specific member should be serialized.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasForAttributeMapperback to summary
private final Mapper aliasForAttributeMapper
aliasForSystemAttributeMapperback to summary
private final Mapper aliasForSystemAttributeMapper
attributeForAliasMapperback to summary
private final Mapper attributeForAliasMapper
defaultImplementationOfMapperback to summary
private final Mapper defaultImplementationOfMapper
getConverterFromAttributeMapperback to summary
private final Mapper getConverterFromAttributeMapper
getConverterFromItemTypeMapperback to summary
private final Mapper getConverterFromItemTypeMapper
getFieldNameForItemTypeAndNameMapperback to summary
private final Mapper getFieldNameForItemTypeAndNameMapper
getImplicitCollectionDefForFieldNameMapperback to summary
private final Mapper getImplicitCollectionDefForFieldNameMapper
getItemTypeForItemFieldNameMapperback to summary
private final Mapper getItemTypeForItemFieldNameMapper
getLocalConverterMapperback to summary
private final Mapper getLocalConverterMapper
isIgnoredElementMapperback to summary
private final Mapper isIgnoredElementMapper
isImmutableValueTypeMapperback to summary
private final Mapper isImmutableValueTypeMapper
isReferenceableMapperback to summary
private final Mapper isReferenceableMapper
realClassMapperback to summary
private final Mapper realClassMapper
realMemberMapperback to summary
private final Mapper realMemberMapper
serializedClassMapperback to summary
private final Mapper serializedClassMapper
serializedMemberMapperback to summary
private final Mapper serializedMemberMapper
shouldSerializeMemberMapperback to summary
private final Mapper shouldSerializeMemberMapper
wrappedback to summary
private final Mapper wrapped

Constructor Detail

MapperWrapperback to summary
public MapperWrapper(Mapper wrapped)

Method Detail

aliasForAttributeback to summary
public String aliasForAttribute(String attribute)

Implements com.thoughtworks.xstream.mapper.Mapper.aliasForAttribute.

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

Get the alias for an attribute's name.

Parameters
attribute:String

the attribute

Returns:String

the alias

aliasForAttributeback to summary
public String aliasForAttribute(Class<T> definedIn, String fieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.aliasForAttribute.

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

Returns an alias for a single field defined in an specific type.

Parameters
definedIn:Class<T>

the type where the field was defined

fieldName:String

the field name

Returns:String

the alias for this field or its own name if no alias was defined

aliasForSystemAttributeback to summary
public String aliasForSystemAttribute(String attribute)

Implements com.thoughtworks.xstream.mapper.Mapper.aliasForSystemAttribute.

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

Get the alias for a system attribute's name.

Parameters
attribute:String

the system attribute

Returns:String

the alias

attributeForAliasback to summary
public String attributeForAlias(String alias)

Implements com.thoughtworks.xstream.mapper.Mapper.attributeForAlias.

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

Get the attribute's name for an alias.

Parameters
alias:String

the alias

Returns:String

the attribute's name

attributeForAliasback to summary
public String attributeForAlias(Class<T> definedIn, String alias)

Implements com.thoughtworks.xstream.mapper.Mapper.attributeForAlias.

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

Returns the field name for an aliased attribute.

Parameters
definedIn:Class<T>

the type where the field was defined

alias:String

the alias

Returns:String

the original attribute name

defaultImplementationOfback to summary
public Class<T> defaultImplementationOf(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.defaultImplementationOf.

getConverterFromAttributeback to summary
public SingleValueConverter getConverterFromAttribute(String name)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

getConverterFromAttributeback to summary
public SingleValueConverter getConverterFromAttribute(Class<T> type, String attribute)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

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

Returns which converter to use for an specific attribute in a type.

Parameters
type:Class<T>

the field's parent

attribute:String

the attribute name

getConverterFromAttributeback to summary
public SingleValueConverter getConverterFromAttribute(Class<T> definedIn, String attribute, Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

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

Returns which converter to use for an specific attribute in a type.

Parameters
definedIn:Class<T>

the field's parent

attribute:String

the attribute name

type:Class<T>

the type the converter should create

getConverterFromItemTypeback to summary
public SingleValueConverter getConverterFromItemType(String fieldName, Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

getConverterFromItemTypeback to summary
public SingleValueConverter getConverterFromItemType(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

getConverterFromItemTypeback to summary
public SingleValueConverter getConverterFromItemType(String fieldName, Class<T> type, Class<T> definedIn)

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

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

Returns a single value converter to be used in a specific field.

Parameters
fieldName:String

the field name

type:Class<T>

the field type

definedIn:Class<T>

the type which defines this field

Returns:SingleValueConverter

a SingleValueConverter or null if there no such converter should be used for this field.

getFieldNameForItemTypeAndNameback to summary
public String getFieldNameForItemTypeAndName(Class<T> definedIn, Class<T> itemType, String itemFieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.getFieldNameForItemTypeAndName.

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

Get the name of the field that acts as the default collection for an object, or return null if there is none.

Parameters
definedIn:Class<T>

owning type

itemType:Class<T>

item type

itemFieldName:String

optional item element name

getImplicitCollectionDefForFieldNameback to summary
public Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class<T> itemType, String fieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.getImplicitCollectionDefForFieldName.

getItemTypeForItemFieldNameback to summary
public Class<T> getItemTypeForItemFieldName(Class<T> definedIn, String itemFieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.getItemTypeForItemFieldName.

getLocalConverterback to summary
public Converter getLocalConverter(Class<T> definedIn, String fieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.getLocalConverter.

isIgnoredElementback to summary
public boolean isIgnoredElement(String name)

Implements com.thoughtworks.xstream.mapper.Mapper.isIgnoredElement.

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

Whether this name can be ignored.

isImmutableValueTypeback to summary
public boolean isImmutableValueType(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.isImmutableValueType.

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

Whether this type is a simple immutable value (int, boolean, String, URL, etc). Immutable types will be repeatedly written in the serialized stream, instead of using object references.

isReferenceableback to summary
public boolean isReferenceable(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.isReferenceable.

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

Whether this type is referenceable in a stream.

lookupMapperOfTypeback to summary
public Mapper lookupMapperOfType(Class<T> type)

Implements com.thoughtworks.xstream.mapper.Mapper.lookupMapperOfType.

realClassback to summary
public Class<T> realClass(String elementName)

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.

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

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.

serializedClassback to summary
public String serializedClass(Class<T> type)

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.

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

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.

shouldSerializeMemberback to summary
public boolean shouldSerializeMember(Class<T> definedIn, String fieldName)

Implements com.thoughtworks.xstream.mapper.Mapper.shouldSerializeMember.

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

Determine whether a specific member should be serialized.