Package com.thoughtworks.xstream.mapper
Class FieldAliasingMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.FieldAliasingMapper
- All Implemented Interfaces:
Mapper
Mapper that allows a field of a specific class to be replaced with a shorter alias.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map
private final ElementIgnoringMapper
protected final Map
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldAlias
(String alias, Class type, String fieldName) void
addFieldsToIgnore
(Pattern pattern) Deprecated.private String
private Object
void
Deprecated.As of 1.4.9 useElementIgnoringMapper.omitField(Class, String)
.realMember
(Class type, String serialized) How a serialized member representation should be mapped back to a real member.serializedMember
(Class type, String memberName) How a class member should be represented in its serialized form.Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, serializedClass, shouldSerializeMember
-
Field Details
-
fieldToAliasMap
-
aliasToFieldMap
-
elementIgnoringMapper
-
-
Constructor Details
-
FieldAliasingMapper
-
-
Method Details
-
addFieldAlias
-
addFieldsToIgnore
Deprecated.As of 1.4.9 useElementIgnoringMapper.addElementsToIgnore(Pattern)
. -
omitField
Deprecated.As of 1.4.9 useElementIgnoringMapper.omitField(Class, String)
. -
key
-
serializedMember
Description copied from interface:Mapper
How a class member should be represented in its serialized form.- Specified by:
serializedMember
in interfaceMapper
- Overrides:
serializedMember
in classMapperWrapper
-
realMember
Description copied from interface:Mapper
How a serialized member representation should be mapped back to a real member.- Specified by:
realMember
in interfaceMapper
- Overrides:
realMember
in classMapperWrapper
-
getMember
-
ElementIgnoringMapper.addElementsToIgnore(Pattern)
.