public class

LocalConversionMapper

extends MapperWrapper
java.lang.Object
   ↳ com.thoughtworks.xstream.mapper.MapperWrapper
     ↳ com.thoughtworks.xstream.mapper.LocalConversionMapper

Class Overview

A Mapper for locally defined converters for a member field.

Summary

Public Constructors
LocalConversionMapper(Mapper wrapped)
Constructs a LocalConversionMapper.
Public Methods
SingleValueConverter getConverterFromAttribute(Class definedIn, String attribute, Class type)
Returns which converter to use for an specific attribute in a type.
SingleValueConverter getConverterFromItemType(String fieldName, Class type, Class definedIn)
Returns a single value converter to be used in a specific field.
Converter getLocalConverter(Class definedIn, String fieldName)
void registerLocalConverter(Class definedIn, String fieldName, Converter converter)
[Expand]
Inherited Methods
From class com.thoughtworks.xstream.mapper.MapperWrapper
From class java.lang.Object
From interface com.thoughtworks.xstream.mapper.Mapper

Public Constructors

public LocalConversionMapper (Mapper wrapped)

Constructs a LocalConversionMapper.

Public Methods

public SingleValueConverter getConverterFromAttribute (Class definedIn, String attribute, Class type)

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

Parameters
definedIn the field's parent
attribute the attribute name
type the type the converter should create

public SingleValueConverter getConverterFromItemType (String fieldName, Class type, Class definedIn)

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

Parameters
fieldName the field name
type the field type
definedIn the type which defines this field
Returns
  • a SingleValueConverter or null if there no such converter should be used for this field.

public Converter getLocalConverter (Class definedIn, String fieldName)

public void registerLocalConverter (Class definedIn, String fieldName, Converter converter)