Package com.thoughtworks.xstream.mapper
Class AttributeAliasingMapper
- java.lang.Object
-
- com.thoughtworks.xstream.mapper.MapperWrapper
-
- com.thoughtworks.xstream.mapper.AbstractAttributeAliasingMapper
-
- com.thoughtworks.xstream.mapper.AttributeAliasingMapper
-
- All Implemented Interfaces:
Mapper
public class AttributeAliasingMapper extends AbstractAttributeAliasingMapper
Mapper that allows aliasing of attribute names.- Since:
- 1.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
-
Field Summary
-
Fields inherited from class com.thoughtworks.xstream.mapper.AbstractAttributeAliasingMapper
aliasToName, nameToAlias
-
-
Constructor Summary
Constructors Constructor Description AttributeAliasingMapper(Mapper wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
aliasForAttribute(java.lang.String attribute)
Get the alias for an attribute's name.java.lang.String
attributeForAlias(java.lang.String alias)
Get the attribute's name for an alias.-
Methods inherited from class com.thoughtworks.xstream.mapper.AbstractAttributeAliasingMapper
addAliasFor, readResolve
-
Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForSystemAttribute, attributeForAlias, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember, shouldSerializeMember
-
-
-
-
Constructor Detail
-
AttributeAliasingMapper
public AttributeAliasingMapper(Mapper wrapped)
-
-
Method Detail
-
aliasForAttribute
public java.lang.String aliasForAttribute(java.lang.String attribute)
Description copied from interface:Mapper
Get the alias for an attribute's name.- Specified by:
aliasForAttribute
in interfaceMapper
- Overrides:
aliasForAttribute
in classMapperWrapper
- Parameters:
attribute
- the attribute- Returns:
- the alias
-
attributeForAlias
public java.lang.String attributeForAlias(java.lang.String alias)
Description copied from interface:Mapper
Get the attribute's name for an alias.- Specified by:
attributeForAlias
in interfaceMapper
- Overrides:
attributeForAlias
in classMapperWrapper
- Parameters:
alias
- the alias- Returns:
- the attribute's name
-
-