Class EnumMapper

java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.EnumMapper
All Implemented Interfaces:
Caching, Mapper

public class EnumMapper extends MapperWrapper implements Caching
Mapper that handles the special case of polymorphic enums in Java 1.5. This renames MyEnum$1 to MyEnum making it less bloaty in the XML and avoiding the need for an alias per enum value to be specified. Additionally every enum is treated automatically as immutable and non-refrenceable type that can be written as attribute.