Top Constructors Methods
com.thoughtworks.xstream.converters.extended

pack-priv Class UseAttributeForEnumMapper

extends AttributeMapper
Class Inheritance
Imports
com.thoughtworks.xstream.converters.SingleValueConverter, com.thoughtworks.xstream.core.util.DependencyInjectionFactory, com.thoughtworks.xstream.mapper.AttributeMapper, .DefaultMapper, .Mapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static Mapper
createEnumMapper(final Mapper mapper)

public SingleValueConverter
getConverterFromAttribute(Class<T>
the field's parent
definedIn
,
String
the attribute name
attribute
,
Class<T>
the type the converter should create
type
)

Overrides com.thoughtworks.xstream.mapper.AttributeMapper.getConverterFromAttribute.

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

Returns which converter to use for an specific attribute in a type.
public SingleValueConverter
getConverterFromItemType(String
the field name
fieldName
,
Class<T>
the field type
type
,
Class<T>
the type which defines this field
definedIn
)

Overrides com.thoughtworks.xstream.mapper.AttributeMapper.getConverterFromItemType.

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

Returns a single value converter to be used in a specific field.
public static boolean
isEnum(Class<T> type)

Deprecated only used for Java 1.4 support
public boolean
Inherited from com.thoughtworks.xstream.mapper.AttributeMapper:
addAttributeForaddAttributeForaddAttributeForaddAttributeForgetConverterFromAttributegetConverterFromAttributegetConverterFromItemTypegetConverterFromItemTypesetConverterLookup

Constructor Detail

UseAttributeForEnumMapperback to summary
public UseAttributeForEnumMapper(Mapper wrapped)

Method Detail

createEnumMapperback to summary
pack-priv static Mapper createEnumMapper(final Mapper mapper)
getConverterFromAttributeback to summary
public SingleValueConverter getConverterFromAttribute(Class<T> definedIn, String attribute, Class<T> type)

Overrides com.thoughtworks.xstream.mapper.AttributeMapper.getConverterFromAttribute.

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

Doc from com.thoughtworks.xstream.mapper.Mapper.getConverterFromAttribute.

Returns which converter to use for an specific attribute in a type.

Parameters
definedIn:Class<T>

the field's parent

attribute:String

the attribute name

type:Class<T>

the type the converter should create

getConverterFromItemTypeback to summary
public SingleValueConverter getConverterFromItemType(String fieldName, Class<T> type, Class<T> definedIn)

Overrides com.thoughtworks.xstream.mapper.AttributeMapper.getConverterFromItemType.

Implements com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

Doc from com.thoughtworks.xstream.mapper.Mapper.getConverterFromItemType.

Returns a single value converter to be used in a specific field.

Parameters
fieldName:String

the field name

type:Class<T>

the field type

definedIn:Class<T>

the type which defines this field

Returns:SingleValueConverter

a SingleValueConverter or null if there no such converter should be used for this field.

isEnumback to summary
public static boolean isEnum(Class<T> type)

Deprecated

only used for Java 1.4 support

shouldLookForSingleValueConverterback to summary
public boolean shouldLookForSingleValueConverter(String fieldName, Class<T> type, Class<T> definedIn)

Overrides com.thoughtworks.xstream.mapper.AttributeMapper.shouldLookForSingleValueConverter.