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.io.xml
Class QNameMap

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

    public class QNameMap

extends Object

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

Version:
  $Revision: 1345 $
Author:
  James Strachan

Constructor Summary
`QNameMap()`

Method Summary
`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.
`void` | `registerMapping(QName qname, Class type)` Registers the mapping of the type to the QName
`void` | `registerMapping(QName qname, String javaClassName)` Registers the mapping of the Java class name to the QName
`void` | `setDefaultNamespace(String defaultNamespace)`
`void` | `setDefaultPrefix(String defaultPrefix)`

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

Constructor Detail

### QNameMap

    public QNameMap()

Method Detail

### getJavaClassName

    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.

### getQName

    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.

### registerMapping

    public void registerMapping(QName qname,
                                String javaClassName)

  Registers the mapping of the Java class name to the QName

### registerMapping

    public void registerMapping(QName qname,
                                Class type)

  Registers the mapping of the type to the QName

### getDefaultNamespace

    public String getDefaultNamespace()

### setDefaultNamespace

    public void setDefaultNamespace(String defaultNamespace)

### getDefaultPrefix

    public String getDefaultPrefix()

### setDefaultPrefix

    public void setDefaultPrefix(String defaultPrefix)

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.