Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.mapper
Class LocalConversionMapper

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

All Implemented Interfaces:
  Mapper

    public class LocalConversionMapper

extends MapperWrapper

A Mapper for locally defined converters for a member field.

Since:
  1.3
Author:
  Jörg Schaible

Nested Class Summary

Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
`Mapper.ImplicitCollectionMapping, Mapper.Null`

Constructor Summary
`LocalConversionMapper(Mapper wrapped)` Constructs a LocalConversionMapper.

Method Summary
`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)`

Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
`aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, attributeForClassDefiningField, attributeForEnumType, attributeForImplementationClass, attributeForReadResolveField, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, isImmutableValueType, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember, shouldSerializeMember`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalConversionMapper

    public LocalConversionMapper(Mapper wrapped)

  Constructs a LocalConversionMapper.

  Parameters:
    `wrapped` -
  Since:
    1.3

Method Detail

### registerLocalConverter

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

### getLocalConverter

    public Converter getLocalConverter(Class definedIn,
                                       String fieldName)

  Specified by:
    `getLocalConverter` in interface `Mapper`
  Overrides:
    `getLocalConverter` in class `MapperWrapper`

### 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 interface `Mapper`
  Overrides:
    `getConverterFromAttribute` in class `MapperWrapper`
  Parameters:
    `definedIn` - the field's parent
    `attribute` - the attribute name
    `type` - the type the converter should create

### getConverterFromItemType

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

  Description copied from interface: `Mapper`
  Returns a single value converter to be used in a specific field.

  Specified by:
    `getConverterFromItemType` in interface `Mapper`
  Overrides:
    `getConverterFromItemType` in class `MapperWrapper`
  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.