edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.mapper
Class EnumMapper
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.mapper.MapperWrapper
edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.mapper.AttributeMapper
edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.mapper.EnumMapper
- All Implemented Interfaces:
- Mapper
public class EnumMapper
- extends AttributeMapper
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 type and can
be written as attribute.
- Author:
- Joe Walnes, Jörg Schaible
| Methods inherited from class edu.internet2.middleware.grouperClientExt.com.thoughtworks.xstream.mapper.MapperWrapper |
aliasForAttribute, aliasForAttribute, attributeForAlias, attributeForAlias, attributeForClassDefiningField, attributeForEnumType, attributeForImplementationClass, attributeForReadResolveField, defaultImplementationOf, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, 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,
ConverterLookup converterLookup)
EnumMapper
@Deprecated
public EnumMapper(Mapper wrapped)
- Deprecated. since 1.3, use
EnumMapper(Mapper, ConverterLookup)
EnumMapper
@Deprecated
public EnumMapper(ClassMapper wrapped)
- Deprecated. since 1.2, use
#EnumMapper(Mapper, ConverterLookup))
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
isImmutableValueType
public boolean isImmutableValueType(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
getLocalConverterFromItemType
protected SingleValueConverter getLocalConverterFromItemType(Class type)
- Overrides:
getLocalConverterFromItemType in class AttributeMapper
Copyright © 2012 Internet2. All Rights Reserved.