public class

QNameMap

extends Object
java.lang.Object
   ↳ com.thoughtworks.xstream.io.xml.QNameMap

Class Overview

Represents a mapping of QName instances to Java class names allowing class aliases and namespace aware mappings of QNames to class names.

Summary

Public Constructors
QNameMap()
Public Methods
String getDefaultNamespace()
String getDefaultPrefix()
String getJavaClassName(QName qname)
Returns the Java class name that should be used for the given QName.
QName getQName(String javaClassName)
Returns the Java class name that should be used for the given QName.
synchronized void registerMapping(QName qname, String javaClassName)
Registers the mapping of the Java class name to the QName
synchronized void registerMapping(QName qname, Class type)
Registers the mapping of the type to the QName
void setDefaultNamespace(String defaultNamespace)
void setDefaultPrefix(String defaultPrefix)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public QNameMap ()

Public Methods

public String getDefaultNamespace ()

public String getDefaultPrefix ()

public String getJavaClassName (QName qname)

Returns the Java class name that should be used for the given QName. If no explicit mapping has been made then the localPart of the QName is used which is the normal default in XStream.

public QName getQName (String javaClassName)

Returns the Java class name that should be used for the given QName. If no explicit mapping has been made then the localPart of the QName is used which is the normal default in XStream.

public synchronized void registerMapping (QName qname, String javaClassName)

Registers the mapping of the Java class name to the QName

public synchronized void registerMapping (QName qname, Class type)

Registers the mapping of the type to the QName

public void setDefaultNamespace (String defaultNamespace)

public void setDefaultPrefix (String defaultPrefix)