|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder
public class XmlFriendlyNameCoder
Encode and decode tag and attribute names in XML drivers.
This NameCoder is designed to ensure the correct encoding and decoding of names used for Java types and fields to XML tags and attribute names.
The default replacements are:
Constructor Summary | |
---|---|
XmlFriendlyNameCoder()
Construct a new XmlFriendlyNameCoder. |
|
XmlFriendlyNameCoder(String dollarReplacement,
String escapeCharReplacement)
Construct a new XmlFriendlyNameCoder with custom replacement strings for dollar and the escape character. |
|
XmlFriendlyNameCoder(String dollarReplacement,
String escapeCharReplacement,
String hexPrefix)
Construct a new XmlFriendlyNameCoder with custom replacement strings for dollar, the escape character and the prefix for hexadecimal encoding of invalid characters in XML names. |
Method Summary | |
---|---|
Object |
clone()
|
String |
decodeAttribute(String attributeName)
Decode an attribute name to an object name. |
String |
decodeNode(String elementName)
Decode a node name to an object name. |
String |
encodeAttribute(String name)
Encode a meta-data name for an attribute in the target format. |
String |
encodeNode(String name)
Encode an object name for a node in the target format. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlFriendlyNameCoder()
public XmlFriendlyNameCoder(String dollarReplacement, String escapeCharReplacement)
dollarReplacement
- escapeCharReplacement
- public XmlFriendlyNameCoder(String dollarReplacement, String escapeCharReplacement, String hexPrefix)
dollarReplacement
- escapeCharReplacement
- Method Detail |
---|
public String decodeAttribute(String attributeName)
decodeAttribute
in interface NameCoder
attributeName
- the name of the attribute
public String decodeNode(String elementName)
decodeNode
in interface NameCoder
elementName
- the name of the node
public String encodeAttribute(String name)
encodeAttribute
in interface NameCoder
name
- the name of the meta-data
public String encodeNode(String name)
encodeNode
in interface NameCoder
name
- the name of the object data
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |