public class MapperDelegate
extends com.thoughtworks.xstream.mapper.MapperWrapper
MapperWrapper
except it lets the subtype
change the delegation target.
Since XStream
caches the result of mapper pipeline,
the kind of mutation and when you can do it is limited.
Modifier and Type | Field and Description |
---|---|
protected com.thoughtworks.xstream.mapper.Mapper |
delegate |
Constructor and Description |
---|
MapperDelegate(com.thoughtworks.xstream.mapper.Mapper delegate) |
Modifier and Type | Method and Description |
---|---|
String |
aliasForAttribute(Class definedIn,
String fieldName)
Deprecated.
since 1.3, use combination of
serializedMember(Class, String) and getConverterFromItemType(String, Class, Class) |
String |
aliasForAttribute(String attribute) |
String |
aliasForSystemAttribute(String attribute) |
String |
attributeForAlias(Class definedIn,
String alias)
Deprecated.
since 1.3, use combination of
realMember(Class, String) and getConverterFromItemType(String, Class, Class) |
String |
attributeForAlias(String alias) |
Class |
defaultImplementationOf(Class type) |
com.thoughtworks.xstream.converters.SingleValueConverter |
getConverterFromAttribute(Class type,
String attribute)
Deprecated.
since 1.3.1, use
getConverterFromAttribute(Class, String, Class) |
com.thoughtworks.xstream.converters.SingleValueConverter |
getConverterFromAttribute(Class definedIn,
String attribute,
Class type) |
com.thoughtworks.xstream.converters.SingleValueConverter |
getConverterFromAttribute(String name)
Deprecated.
since 1.3, use
getConverterFromAttribute(Class, String, Class) |
com.thoughtworks.xstream.converters.SingleValueConverter |
getConverterFromItemType(Class type)
Deprecated.
since 1.3, use
getConverterFromItemType(String, Class, Class) |
com.thoughtworks.xstream.converters.SingleValueConverter |
getConverterFromItemType(String fieldName,
Class type)
Deprecated.
since 1.3, use
getConverterFromItemType(String, Class, Class) |
com.thoughtworks.xstream.converters.SingleValueConverter |
getConverterFromItemType(String fieldName,
Class type,
Class definedIn) |
String |
getFieldNameForItemTypeAndName(Class definedIn,
Class itemType,
String itemFieldName) |
com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMapping |
getImplicitCollectionDefForFieldName(Class itemType,
String fieldName) |
Class |
getItemTypeForItemFieldName(Class definedIn,
String itemFieldName) |
com.thoughtworks.xstream.converters.Converter |
getLocalConverter(Class definedIn,
String fieldName) |
boolean |
isIgnoredElement(String name) |
boolean |
isImmutableValueType(Class type) |
boolean |
isReferenceable(Class type) |
com.thoughtworks.xstream.mapper.Mapper |
lookupMapperOfType(Class type) |
Class |
realClass(String elementName) |
String |
realMember(Class type,
String serialized) |
String |
serializedClass(Class type) |
String |
serializedMember(Class type,
String memberName) |
boolean |
shouldSerializeMember(Class definedIn,
String fieldName) |
public MapperDelegate(com.thoughtworks.xstream.mapper.Mapper delegate)
public String serializedClass(Class type)
serializedClass
in interface com.thoughtworks.xstream.mapper.Mapper
serializedClass
in class com.thoughtworks.xstream.mapper.MapperWrapper
public Class realClass(String elementName)
realClass
in interface com.thoughtworks.xstream.mapper.Mapper
realClass
in class com.thoughtworks.xstream.mapper.MapperWrapper
public String serializedMember(Class type, String memberName)
serializedMember
in interface com.thoughtworks.xstream.mapper.Mapper
serializedMember
in class com.thoughtworks.xstream.mapper.MapperWrapper
public String realMember(Class type, String serialized)
realMember
in interface com.thoughtworks.xstream.mapper.Mapper
realMember
in class com.thoughtworks.xstream.mapper.MapperWrapper
public boolean isImmutableValueType(Class type)
isImmutableValueType
in interface com.thoughtworks.xstream.mapper.Mapper
isImmutableValueType
in class com.thoughtworks.xstream.mapper.MapperWrapper
public Class defaultImplementationOf(Class type)
defaultImplementationOf
in interface com.thoughtworks.xstream.mapper.Mapper
defaultImplementationOf
in class com.thoughtworks.xstream.mapper.MapperWrapper
public String aliasForAttribute(String attribute)
aliasForAttribute
in interface com.thoughtworks.xstream.mapper.Mapper
aliasForAttribute
in class com.thoughtworks.xstream.mapper.MapperWrapper
public String attributeForAlias(String alias)
attributeForAlias
in interface com.thoughtworks.xstream.mapper.Mapper
attributeForAlias
in class com.thoughtworks.xstream.mapper.MapperWrapper
public String aliasForSystemAttribute(String attribute)
aliasForSystemAttribute
in interface com.thoughtworks.xstream.mapper.Mapper
aliasForSystemAttribute
in class com.thoughtworks.xstream.mapper.MapperWrapper
public String getFieldNameForItemTypeAndName(Class definedIn, Class itemType, String itemFieldName)
getFieldNameForItemTypeAndName
in interface com.thoughtworks.xstream.mapper.Mapper
getFieldNameForItemTypeAndName
in class com.thoughtworks.xstream.mapper.MapperWrapper
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName)
getItemTypeForItemFieldName
in interface com.thoughtworks.xstream.mapper.Mapper
getItemTypeForItemFieldName
in class com.thoughtworks.xstream.mapper.MapperWrapper
public com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName)
getImplicitCollectionDefForFieldName
in interface com.thoughtworks.xstream.mapper.Mapper
getImplicitCollectionDefForFieldName
in class com.thoughtworks.xstream.mapper.MapperWrapper
public boolean shouldSerializeMember(Class definedIn, String fieldName)
shouldSerializeMember
in interface com.thoughtworks.xstream.mapper.Mapper
shouldSerializeMember
in class com.thoughtworks.xstream.mapper.MapperWrapper
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(String fieldName, Class type)
getConverterFromItemType(String, Class, Class)
getConverterFromItemType
in interface com.thoughtworks.xstream.mapper.Mapper
getConverterFromItemType
in class com.thoughtworks.xstream.mapper.MapperWrapper
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(Class type)
getConverterFromItemType(String, Class, Class)
getConverterFromItemType
in interface com.thoughtworks.xstream.mapper.Mapper
getConverterFromItemType
in class com.thoughtworks.xstream.mapper.MapperWrapper
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(String name)
getConverterFromAttribute(Class, String, Class)
getConverterFromAttribute
in interface com.thoughtworks.xstream.mapper.Mapper
getConverterFromAttribute
in class com.thoughtworks.xstream.mapper.MapperWrapper
public com.thoughtworks.xstream.converters.Converter getLocalConverter(Class definedIn, String fieldName)
getLocalConverter
in interface com.thoughtworks.xstream.mapper.Mapper
getLocalConverter
in class com.thoughtworks.xstream.mapper.MapperWrapper
public com.thoughtworks.xstream.mapper.Mapper lookupMapperOfType(Class type)
lookupMapperOfType
in interface com.thoughtworks.xstream.mapper.Mapper
lookupMapperOfType
in class com.thoughtworks.xstream.mapper.MapperWrapper
public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(String fieldName, Class type, Class definedIn)
getConverterFromItemType
in interface com.thoughtworks.xstream.mapper.Mapper
getConverterFromItemType
in class com.thoughtworks.xstream.mapper.MapperWrapper
@Deprecated public String aliasForAttribute(Class definedIn, String fieldName)
serializedMember(Class, String)
and getConverterFromItemType(String, Class, Class)
aliasForAttribute
in interface com.thoughtworks.xstream.mapper.Mapper
aliasForAttribute
in class com.thoughtworks.xstream.mapper.MapperWrapper
@Deprecated public String attributeForAlias(Class definedIn, String alias)
realMember(Class, String)
and getConverterFromItemType(String, Class, Class)
attributeForAlias
in interface com.thoughtworks.xstream.mapper.Mapper
attributeForAlias
in class com.thoughtworks.xstream.mapper.MapperWrapper
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(Class type, String attribute)
getConverterFromAttribute(Class, String, Class)
getConverterFromAttribute
in interface com.thoughtworks.xstream.mapper.Mapper
getConverterFromAttribute
in class com.thoughtworks.xstream.mapper.MapperWrapper
public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(Class definedIn, String attribute, Class type)
getConverterFromAttribute
in interface com.thoughtworks.xstream.mapper.Mapper
getConverterFromAttribute
in class com.thoughtworks.xstream.mapper.MapperWrapper
public boolean isIgnoredElement(String name)
isIgnoredElement
in interface com.thoughtworks.xstream.mapper.Mapper
isIgnoredElement
in class com.thoughtworks.xstream.mapper.MapperWrapper
public boolean isReferenceable(Class type)
isReferenceable
in interface com.thoughtworks.xstream.mapper.Mapper
isReferenceable
in class com.thoughtworks.xstream.mapper.MapperWrapper
Copyright © 2004–2021. All rights reserved.