|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.AttributeMapper
public class AttributeMapper
Mapper that allows the usage of attributes for fields and corresponding
types or specified arbitrary types. It is responsible for the lookup of the
SingleValueConverter for item types and attribute names.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper |
|---|
Mapper.ImplicitCollectionMapping, Mapper.Null |
| Constructor Summary | |
|---|---|
AttributeMapper(Mapper wrapped)
Deprecated. since 1.3 |
|
AttributeMapper(Mapper wrapped,
ConverterLookup converterLookup)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeMapper(Mapper wrapped)
public AttributeMapper(Mapper wrapped,
ConverterLookup converterLookup)
| Method Detail |
|---|
public void setConverterLookup(ConverterLookup converterLookup)
public void addAttributeFor(String fieldName,
Class type)
public void addAttributeFor(Class type)
public SingleValueConverter getConverterFromItemType(String fieldName,
Class type)
getConverterFromItemType(String, Class, Class)
getConverterFromItemType in interface MappergetConverterFromItemType in class MapperWrapper
public SingleValueConverter getConverterFromItemType(String fieldName,
Class type,
Class definedIn)
Mapper
getConverterFromItemType in interface MappergetConverterFromItemType in class MapperWrapperfieldName - the field nametype - the field typedefinedIn - the type which defines this field
public boolean shouldLookForSingleValueConverter(String fieldName,
Class type,
Class definedIn)
public SingleValueConverter getConverterFromItemType(Class type)
getConverterFromItemType(String, Class, Class)
getConverterFromItemType in interface MappergetConverterFromItemType in class MapperWrapperpublic SingleValueConverter getConverterFromAttribute(String attributeName)
getConverterFromAttribute(Class, String, Class)
getConverterFromAttribute in interface MappergetConverterFromAttribute in class MapperWrapper
public SingleValueConverter getConverterFromAttribute(Class definedIn,
String attribute)
getConverterFromAttribute(Class, String, Class)
Mapper
getConverterFromAttribute in interface MappergetConverterFromAttribute in class MapperWrapperdefinedIn - the field's parentattribute - the attribute name
public SingleValueConverter getConverterFromAttribute(Class definedIn,
String attribute,
Class type)
Mapper
getConverterFromAttribute in interface MappergetConverterFromAttribute in class MapperWrapperdefinedIn - the field's parentattribute - the attribute nametype - the type the converter should createpublic void addAttributeFor(Field field)
field - the field itself
public void addAttributeFor(Class definedIn,
String fieldName)
definedIn - the declaring class of the fieldfieldName - the name of the field
IllegalArgumentException - if the field does not exist
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||