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 Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static MappercreateEnumMapper(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 booleanDeprecated.only used for Java 1.4 supportbooleanshouldLookForSingleValueConverter(String fieldName, Class type, Class definedIn) Methods inherited from class AttributeMapper
addAttributeFor, addAttributeFor, addAttributeFor, addAttributeFor, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, setConverterLookupMethods inherited from class 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:
shouldLookForSingleValueConverterin classAttributeMapper
-
getConverterFromItemType
Description copied from interface:MapperReturns a single value converter to be used in a specific field.- Specified by:
getConverterFromItemTypein interfaceMapper- Overrides:
getConverterFromItemTypein 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:MapperReturns which converter to use for an specific attribute in a type.- Specified by:
getConverterFromAttributein interfaceMapper- Overrides:
getConverterFromAttributein classAttributeMapper- Parameters:
definedIn- the field's parentattribute- the attribute nametype- the type the converter should create
-
createEnumMapper
-