Class MemoryOptimizedXmlFriendlyReplacer

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

    public class MemoryOptimizedXmlFriendlyReplacer
    extends com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
    • Constructor Detail

      • MemoryOptimizedXmlFriendlyReplacer

        public MemoryOptimizedXmlFriendlyReplacer()
    • Method Detail

      • encodeNode

        public String encodeNode​(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 String decodeNode​(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