com.thoughtworks.xstream.mapper
Class EnumMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.EnumMapper
- All Implemented Interfaces:
- Mapper
public class EnumMapper
- extends MapperWrapper
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.
- Author:
- Joe Walnes
| 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, isImmutableValueType, lookupMapperOfType, realClass, realMember, serializedMember, shouldSerializeMember |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumMapper
public EnumMapper(Mapper wrapped)
EnumMapper
public EnumMapper(ClassMapper wrapped)
- Deprecated. As of 1.2, use
EnumMapper(Mapper)
serializedClass
public String serializedClass(Class type)
- Description copied from interface:
Mapper
- How a class name should be represented in its serialized form.
- Specified by:
serializedClass in interface Mapper- Overrides:
serializedClass in class MapperWrapper
Copyright © 2004-2007 XStream. All Rights Reserved.