Package hudson.util.xstream
Class MapperDelegate
- java.lang.Object
-
- com.thoughtworks.xstream.mapper.MapperWrapper
-
- hudson.util.xstream.MapperDelegate
-
- All Implemented Interfaces:
com.thoughtworks.xstream.mapper.Mapper
public class MapperDelegate extends com.thoughtworks.xstream.mapper.MapperWrapper
Works likeMapperWrapper
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.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected com.thoughtworks.xstream.mapper.Mapper
delegate
-
Constructor Summary
Constructors Constructor Description MapperDelegate(com.thoughtworks.xstream.mapper.Mapper delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
aliasForAttribute(Class definedIn, String fieldName)
Deprecated.since 1.3, use combination ofserializedMember(Class, String)
andgetConverterFromItemType(String, Class, Class)
String
aliasForAttribute(String attribute)
String
aliasForSystemAttribute(String attribute)
String
attributeForAlias(Class definedIn, String alias)
Deprecated.since 1.3, use combination ofrealMember(Class, String)
andgetConverterFromItemType(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, usegetConverterFromAttribute(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, usegetConverterFromAttribute(Class, String, Class)
com.thoughtworks.xstream.converters.SingleValueConverter
getConverterFromItemType(Class type)
Deprecated.since 1.3, usegetConverterFromItemType(String, Class, Class)
com.thoughtworks.xstream.converters.SingleValueConverter
getConverterFromItemType(String fieldName, Class type)
Deprecated.since 1.3, usegetConverterFromItemType(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)
-
-
-
Method Detail
-
serializedClass
public String serializedClass(Class type)
- Specified by:
serializedClass
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
serializedClass
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
realClass
public Class realClass(String elementName)
- Specified by:
realClass
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
realClass
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
serializedMember
public String serializedMember(Class type, String memberName)
- Specified by:
serializedMember
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
serializedMember
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
realMember
public String realMember(Class type, String serialized)
- Specified by:
realMember
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
realMember
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
isImmutableValueType
public boolean isImmutableValueType(Class type)
- Specified by:
isImmutableValueType
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
isImmutableValueType
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
defaultImplementationOf
public Class defaultImplementationOf(Class type)
- Specified by:
defaultImplementationOf
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
defaultImplementationOf
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
aliasForAttribute
public String aliasForAttribute(String attribute)
- Specified by:
aliasForAttribute
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
aliasForAttribute
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
attributeForAlias
public String attributeForAlias(String alias)
- Specified by:
attributeForAlias
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
attributeForAlias
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
aliasForSystemAttribute
public String aliasForSystemAttribute(String attribute)
- Specified by:
aliasForSystemAttribute
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
aliasForSystemAttribute
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getFieldNameForItemTypeAndName
public String getFieldNameForItemTypeAndName(Class definedIn, Class itemType, String itemFieldName)
- Specified by:
getFieldNameForItemTypeAndName
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getFieldNameForItemTypeAndName
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getItemTypeForItemFieldName
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName)
- Specified by:
getItemTypeForItemFieldName
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getItemTypeForItemFieldName
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getImplicitCollectionDefForFieldName
public com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName)
- Specified by:
getImplicitCollectionDefForFieldName
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getImplicitCollectionDefForFieldName
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
shouldSerializeMember
public boolean shouldSerializeMember(Class definedIn, String fieldName)
- Specified by:
shouldSerializeMember
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
shouldSerializeMember
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromItemType
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(String fieldName, Class type)
Deprecated.since 1.3, usegetConverterFromItemType(String, Class, Class)
- Specified by:
getConverterFromItemType
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getConverterFromItemType
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromItemType
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(Class type)
Deprecated.since 1.3, usegetConverterFromItemType(String, Class, Class)
- Specified by:
getConverterFromItemType
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getConverterFromItemType
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromAttribute
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(String name)
Deprecated.since 1.3, usegetConverterFromAttribute(Class, String, Class)
- Specified by:
getConverterFromAttribute
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getConverterFromAttribute
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getLocalConverter
public com.thoughtworks.xstream.converters.Converter getLocalConverter(Class definedIn, String fieldName)
- Specified by:
getLocalConverter
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getLocalConverter
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
lookupMapperOfType
public com.thoughtworks.xstream.mapper.Mapper lookupMapperOfType(Class type)
- Specified by:
lookupMapperOfType
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
lookupMapperOfType
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromItemType
public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(String fieldName, Class type, Class definedIn)
- Specified by:
getConverterFromItemType
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getConverterFromItemType
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
aliasForAttribute
@Deprecated public String aliasForAttribute(Class definedIn, String fieldName)
Deprecated.since 1.3, use combination ofserializedMember(Class, String)
andgetConverterFromItemType(String, Class, Class)
- Specified by:
aliasForAttribute
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
aliasForAttribute
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
attributeForAlias
@Deprecated public String attributeForAlias(Class definedIn, String alias)
Deprecated.since 1.3, use combination ofrealMember(Class, String)
andgetConverterFromItemType(String, Class, Class)
- Specified by:
attributeForAlias
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
attributeForAlias
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromAttribute
@Deprecated public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(Class type, String attribute)
Deprecated.since 1.3.1, usegetConverterFromAttribute(Class, String, Class)
- Specified by:
getConverterFromAttribute
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getConverterFromAttribute
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromAttribute
public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(Class definedIn, String attribute, Class type)
- Specified by:
getConverterFromAttribute
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
getConverterFromAttribute
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
isIgnoredElement
public boolean isIgnoredElement(String name)
- Specified by:
isIgnoredElement
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
isIgnoredElement
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
isReferenceable
public boolean isReferenceable(Class type)
- Specified by:
isReferenceable
in interfacecom.thoughtworks.xstream.mapper.Mapper
- Overrides:
isReferenceable
in classcom.thoughtworks.xstream.mapper.MapperWrapper
-
-