Package com.thoughtworks.xstream.mapper
Class CachingMapper
- java.lang.Object
-
- com.thoughtworks.xstream.mapper.MapperWrapper
-
- com.thoughtworks.xstream.mapper.CachingMapper
-
public class CachingMapper extends MapperWrapper implements Caching
Mapper that caches which names map to which classes. Prevents repetitive searching and class loading.
-
-
Nested Class Summary
-
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.util.Map
realClassCache
-
Constructor Summary
Constructors Constructor Description CachingMapper(Mapper wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flushCache()
private java.lang.Object
readResolve()
java.lang.Class
realClass(java.lang.String elementName)
How a serialized class representation should be mapped back to a real class.-
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, serializedClass, serializedMember, shouldSerializeMember
-
-
-
-
Constructor Detail
-
CachingMapper
public CachingMapper(Mapper wrapped)
-
-
Method Detail
-
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
-
flushCache
public void flushCache()
- Specified by:
flushCache
in interfaceCaching
-
readResolve
private java.lang.Object readResolve()
-
-