com.thoughtworks.xstream.mapper
Class ImmutableTypesMapper

java.lang.Object
  extended bycom.thoughtworks.xstream.mapper.MapperWrapper
      extended bycom.thoughtworks.xstream.mapper.ImmutableTypesMapper
All Implemented Interfaces:
Mapper

public class ImmutableTypesMapper
extends MapperWrapper

Mapper that specifies which types are basic immutable types. Types that are marked as immutable will be written multiple times in the serialization stream without using references.

Author:
Joe Walnes

Nested Class Summary
 
Nested classes inherited from class com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
 
Constructor Summary
ImmutableTypesMapper(ClassMapper wrapped)
          Deprecated. As of 1.2, use ImmutableTypesMapper(Mapper)
ImmutableTypesMapper(Mapper wrapped)
           
 
Method Summary
 void addImmutableType(java.lang.Class type)
           
 boolean isImmutableValueType(java.lang.Class type)
          Whether this type is a simple immutable value (int, boolean, String, URL, etc.
 
Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, attributeForAlias, attributeForAlias, attributeForClassDefiningField, attributeForEnumType, attributeForImplementationClass, attributeForReadResolveField, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember, shouldSerializeMember
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmutableTypesMapper

public ImmutableTypesMapper(Mapper wrapped)

ImmutableTypesMapper

public ImmutableTypesMapper(ClassMapper wrapped)
Deprecated. As of 1.2, use ImmutableTypesMapper(Mapper)

Method Detail

addImmutableType

public void addImmutableType(java.lang.Class type)

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
Overrides:
isImmutableValueType in class MapperWrapper


Joe Walnes, http://xstream.codehaus.org/