Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.mapper
Class AbstractXmlFriendlyMapper

    java.lang.Object
      com.thoughtworks.xstream.mapper.MapperWrapper
          com.thoughtworks.xstream.mapper.AbstractXmlFriendlyMapper

All Implemented Interfaces:
  Mapper

Direct Known Subclasses:
  XmlFriendlyMapper, XStream11XmlFriendlyMapper

    public class AbstractXmlFriendlyMapper

extends MapperWrapper

Mapper that ensures that all names in the serialization stream are XML friendly. The replacement chars and strings are:

- $ (dollar) chars appearing in class names are replaced with _ (underscore) chars.
- $ (dollar) chars appearing in field names are replaced with _DOLLAR_ string.
- _ (underscore) chars appearing in field names are replaced with __ (double underscore) string.
- default as the prefix for class names with no package.

Author:
  Joe Walnes, Mauro Talevi

Nested Class Summary

Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
`Mapper.ImplicitCollectionMapping, Mapper.Null`

Constructor Summary
`protected` | `AbstractXmlFriendlyMapper(Mapper wrapped)`

Method Summary
`protected String` | `escapeClassName(String className)`
`protected String` | `escapeFieldName(String fieldName)`
`protected String` | `unescapeClassName(String className)`
`protected String` | `unescapeFieldName(String xmlName)`

Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
`aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, attributeForClassDefiningField, attributeForEnumType, attributeForImplementationClass, attributeForReadResolveField, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isImmutableValueType, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember, shouldSerializeMember`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractXmlFriendlyMapper

    protected AbstractXmlFriendlyMapper(Mapper wrapped)

Method Detail

### escapeClassName

    protected String escapeClassName(String className)

### unescapeClassName

    protected String unescapeClassName(String className)

### escapeFieldName

    protected String escapeFieldName(String fieldName)

### unescapeFieldName

    protected String unescapeFieldName(String xmlName)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.