com.thoughtworks.xstream.mapper
Class DefaultMapper
java.lang.Object
com.thoughtworks.xstream.mapper.DefaultMapper
- All Implemented Interfaces:
- ClassMapper, Mapper
- public class DefaultMapper
- extends java.lang.Object
- implements ClassMapper
Default mapper implementation with 'vanilla' functionality. To build up the functionality required, wrap this mapper
with other mapper implementations.
- Author:
- Joe Walnes
Constructor Summary |
DefaultMapper(java.lang.ClassLoader classLoader)
|
DefaultMapper(java.lang.ClassLoader classLoader,
java.lang.String classAttributeIdentifier)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultMapper
public DefaultMapper(java.lang.ClassLoader classLoader)
DefaultMapper
public DefaultMapper(java.lang.ClassLoader classLoader,
java.lang.String classAttributeIdentifier)
lookupName
public java.lang.String lookupName(java.lang.Class type)
- Specified by:
lookupName
in interface ClassMapper
lookupType
public java.lang.Class lookupType(java.lang.String elementName)
- Specified by:
lookupType
in interface ClassMapper
lookupDefaultType
public java.lang.Class lookupDefaultType(java.lang.Class baseType)
- Specified by:
lookupDefaultType
in interface ClassMapper
defaultImplementationOf
public java.lang.Class defaultImplementationOf(java.lang.Class type)
- Specified by:
defaultImplementationOf
in interface Mapper
attributeForClassDefiningField
public java.lang.String attributeForClassDefiningField()
- Specified by:
attributeForClassDefiningField
in interface Mapper
attributeForImplementationClass
public java.lang.String attributeForImplementationClass()
- Specified by:
attributeForImplementationClass
in interface Mapper
isImmutableValueType
public boolean isImmutableValueType(java.lang.Class type)
- Description copied from interface:
Mapper
- Whether this type is a simple immutable value (int, boolean, String, URL, etc.
Immutable types will be repeatedly written in the serialized stream, instead of using object references.
- Specified by:
isImmutableValueType
in interface Mapper
mapNameFromXML
public java.lang.String mapNameFromXML(java.lang.String xmlName)
- Specified by:
mapNameFromXML
in interface ClassMapper
mapNameToXML
public java.lang.String mapNameToXML(java.lang.String javaName)
- Specified by:
mapNameToXML
in interface ClassMapper
alias
public void alias(java.lang.String elementName,
java.lang.Class type,
java.lang.Class defaultImplementation)
- Specified by:
alias
in interface ClassMapper
Joe Walnes, http://xstream.codehaus.org/