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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Mapper
createEnumMapper
(Mapper mapper) getConverterFromAttribute
(Class definedIn, String attribute, Class type) Returns which converter to use for an specific attribute in a type.getConverterFromItemType
(String fieldName, Class type, Class definedIn) Returns a single value converter to be used in a specific field.static boolean
Deprecated.only used for Java 1.4 supportboolean
shouldLookForSingleValueConverter
(String fieldName, Class type, 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 Details
-
UseAttributeForEnumMapper
-
-
Method Details
-
isEnum
Deprecated.only used for Java 1.4 support -
shouldLookForSingleValueConverter
- Overrides:
shouldLookForSingleValueConverter
in classAttributeMapper
-
getConverterFromItemType
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(Class definedIn, String attribute, 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
-
createEnumMapper
-