Class MemoryOptimizedXmlFriendlyReplacer

  • All Implemented Interfaces:
    com.thoughtworks.xstream.io.naming.NameCoder, java.lang.Cloneable

    public class MemoryOptimizedXmlFriendlyReplacer
    extends com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decodeNode​(java.lang.String name)
      Replaces '_-' with '$' and '__' with '_'
      java.lang.String encodeNode​(java.lang.String name)
      Replaces '$' with '_-' and '_' with '__'
      • Methods inherited from class com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder

        clone, createCacheMap, decodeAttribute, encodeAttribute
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemoryOptimizedXmlFriendlyReplacer

        public MemoryOptimizedXmlFriendlyReplacer()
    • Method Detail

      • encodeNode

        public java.lang.String encodeNode​(java.lang.String name)
        Replaces '$' with '_-' and '_' with '__'
        Specified by:
        encodeNode in interface com.thoughtworks.xstream.io.naming.NameCoder
        Overrides:
        encodeNode in class com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
        Parameters:
        name - string where replacements have to be made
        Returns:
        escaped name
      • decodeNode

        public java.lang.String decodeNode​(java.lang.String name)
        Replaces '_-' with '$' and '__' with '_'
        Specified by:
        decodeNode in interface com.thoughtworks.xstream.io.naming.NameCoder
        Overrides:
        decodeNode in class com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
        Parameters:
        name - string where replacements have to be made
        Returns:
        unescaped name