Class UseAttributeForEnumMapper
- java.lang.Object
-
- com.thoughtworks.xstream.mapper.MapperWrapper
-
- com.thoughtworks.xstream.mapper.AttributeMapper
-
- com.thoughtworks.xstream.converters.extended.UseAttributeForEnumMapper
-
- All Implemented Interfaces:
Mapper
class UseAttributeForEnumMapper extends AttributeMapper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
-
Constructor Summary
Constructors Constructor Description UseAttributeForEnumMapper(Mapper wrapped)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) static Mapper
createEnumMapper(Mapper mapper)
SingleValueConverter
getConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute, java.lang.Class type)
Returns which converter to use for an specific attribute in a type.SingleValueConverter
getConverterFromItemType(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
Returns a single value converter to be used in a specific field.static boolean
isEnum(java.lang.Class type)
Deprecated.only used for Java 1.4 supportboolean
shouldLookForSingleValueConverter(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
-
Methods inherited from class com.thoughtworks.xstream.mapper.AttributeMapper
addAttributeFor, addAttributeFor, addAttributeFor, addAttributeFor, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, setConverterLookup
-
Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember, shouldSerializeMember
-
-
-
-
Constructor Detail
-
UseAttributeForEnumMapper
public UseAttributeForEnumMapper(Mapper wrapped)
-
-
Method Detail
-
isEnum
public static boolean isEnum(java.lang.Class type)
Deprecated.only used for Java 1.4 support
-
shouldLookForSingleValueConverter
public boolean shouldLookForSingleValueConverter(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
- Overrides:
shouldLookForSingleValueConverter
in classAttributeMapper
-
getConverterFromItemType
public SingleValueConverter getConverterFromItemType(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
Description copied from interface:Mapper
Returns a single value converter to be used in a specific field.- Specified by:
getConverterFromItemType
in interfaceMapper
- Overrides:
getConverterFromItemType
in classAttributeMapper
- Parameters:
fieldName
- the field nametype
- the field typedefinedIn
- the type which defines this field- Returns:
- a SingleValueConverter or null if there no such converter should be used for this field.
-
getConverterFromAttribute
public SingleValueConverter getConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute, java.lang.Class type)
Description copied from interface:Mapper
Returns which converter to use for an specific attribute in a type.- Specified by:
getConverterFromAttribute
in interfaceMapper
- Overrides:
getConverterFromAttribute
in classAttributeMapper
- Parameters:
definedIn
- the field's parentattribute
- the attribute nametype
- the type the converter should create
-
-