Package com.thoughtworks.xstream.mapper
Class DynamicProxyMapper
- java.lang.Object
-
- com.thoughtworks.xstream.mapper.MapperWrapper
-
- com.thoughtworks.xstream.mapper.DynamicProxyMapper
-
- All Implemented Interfaces:
Mapper
public class DynamicProxyMapper extends MapperWrapper
Mapper for handling special cases of aliasing dynamic proxies. The alias property specifies the name an instance of a dynamic proxy should be serialized with.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DynamicProxyMapper.DynamicProxy
Place holder type used for dynamic proxies.-
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
alias
-
Constructor Summary
Constructors Constructor Description DynamicProxyMapper(Mapper wrapped)
DynamicProxyMapper(Mapper wrapped, java.lang.String alias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlias()
java.lang.Class
realClass(java.lang.String elementName)
How a serialized class representation should be mapped back to a real class.java.lang.String
serializedClass(java.lang.Class type)
How a class name should be represented in its serialized form.void
setAlias(java.lang.String alias)
-
Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realMember, serializedMember, shouldSerializeMember
-
-
-
-
Method Detail
-
getAlias
public java.lang.String getAlias()
-
setAlias
public void setAlias(java.lang.String alias)
-
serializedClass
public java.lang.String serializedClass(java.lang.Class type)
Description copied from interface:Mapper
How a class name should be represented in its serialized form.- Specified by:
serializedClass
in interfaceMapper
- Overrides:
serializedClass
in classMapperWrapper
-
realClass
public java.lang.Class realClass(java.lang.String elementName)
Description copied from interface:Mapper
How a serialized class representation should be mapped back to a real class.- Specified by:
realClass
in interfaceMapper
- Overrides:
realClass
in classMapperWrapper
-
-