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 MappercreateEnumMapper(Mapper mapper)SingleValueConvertergetConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute, java.lang.Class type)Returns which converter to use for an specific attribute in a type.SingleValueConvertergetConverterFromItemType(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 booleanisEnum(java.lang.Class type)Deprecated.only used for Java 1.4 supportbooleanshouldLookForSingleValueConverter(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:
shouldLookForSingleValueConverterin classAttributeMapper
-
getConverterFromItemType
public SingleValueConverter getConverterFromItemType(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
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(java.lang.Class definedIn, java.lang.String attribute, java.lang.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
-
-