com.thoughtworks.xstream.mapper
Class MapperWrapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
- All Implemented Interfaces:
- ClassMapper, Mapper
- Direct Known Subclasses:
- AliasingMapper, ArrayMapper, CachingMapper, DefaultImplementationsMapper, DynamicProxyMapper, ImmutableTypesMapper, OuterClassMapper, XmlFriendlyMapper
- public abstract class MapperWrapper
- extends java.lang.Object
- implements ClassMapper
Method Summary |
void |
alias(java.lang.String elementName,
java.lang.Class type,
java.lang.Class defaultImplementation)
Deprecated. As of 1.1.1, use AliasingMapper.addAlias(String, Class) for creating an alias and
DefaultImplementationsMapper.addDefaultImplementation(Class, Class) for specifiny a
default implementation. |
java.lang.String |
attributeForClassDefiningField()
|
java.lang.String |
attributeForImplementationClass()
|
java.lang.Class |
defaultImplementationOf(java.lang.Class type)
|
boolean |
isImmutableValueType(java.lang.Class type)
Whether this type is a simple immutable value (int, boolean, String, URL, etc. |
java.lang.Class |
lookupDefaultType(java.lang.Class baseType)
Deprecated. As of 1.1.1, use defaultImplementationOf(Class) |
java.lang.String |
lookupName(java.lang.Class type)
|
java.lang.Class |
lookupType(java.lang.String elementName)
|
java.lang.String |
mapNameFromXML(java.lang.String xmlName)
|
java.lang.String |
mapNameToXML(java.lang.String javaName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapperWrapper
public MapperWrapper(ClassMapper wrapped)
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
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
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
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
lookupDefaultType
public java.lang.Class lookupDefaultType(java.lang.Class baseType)
- Deprecated. As of 1.1.1, use
defaultImplementationOf(Class)
- Specified by:
lookupDefaultType
in interface ClassMapper
alias
public void alias(java.lang.String elementName,
java.lang.Class type,
java.lang.Class defaultImplementation)
- Deprecated. As of 1.1.1, use
AliasingMapper.addAlias(String, Class)
for creating an alias and
DefaultImplementationsMapper.addDefaultImplementation(Class, Class)
for specifiny a
default implementation.
- Specified by:
alias
in interface ClassMapper
Joe Walnes, http://xstream.codehaus.org/