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.MapperWrapperWorks likeMapperWrapperexcept it lets the subtype change the delegation target.Since
XStreamcaches 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.Mapperdelegate
-
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 StringaliasForAttribute(Class definedIn, String fieldName)Deprecated.since 1.3, use combination ofserializedMember(Class, String)andgetConverterFromItemType(String, Class, Class)StringaliasForAttribute(String attribute)StringaliasForSystemAttribute(String attribute)StringattributeForAlias(Class definedIn, String alias)Deprecated.since 1.3, use combination ofrealMember(Class, String)andgetConverterFromItemType(String, Class, Class)StringattributeForAlias(String alias)ClassdefaultImplementationOf(Class type)com.thoughtworks.xstream.converters.SingleValueConvertergetConverterFromAttribute(Class type, String attribute)Deprecated.since 1.3.1, usegetConverterFromAttribute(Class, String, Class)com.thoughtworks.xstream.converters.SingleValueConvertergetConverterFromAttribute(Class definedIn, String attribute, Class type)com.thoughtworks.xstream.converters.SingleValueConvertergetConverterFromAttribute(String name)Deprecated.since 1.3, usegetConverterFromAttribute(Class, String, Class)com.thoughtworks.xstream.converters.SingleValueConvertergetConverterFromItemType(Class type)Deprecated.since 1.3, usegetConverterFromItemType(String, Class, Class)com.thoughtworks.xstream.converters.SingleValueConvertergetConverterFromItemType(String fieldName, Class type)Deprecated.since 1.3, usegetConverterFromItemType(String, Class, Class)com.thoughtworks.xstream.converters.SingleValueConvertergetConverterFromItemType(String fieldName, Class type, Class definedIn)StringgetFieldNameForItemTypeAndName(Class definedIn, Class itemType, String itemFieldName)com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMappinggetImplicitCollectionDefForFieldName(Class itemType, String fieldName)ClassgetItemTypeForItemFieldName(Class definedIn, String itemFieldName)com.thoughtworks.xstream.converters.ConvertergetLocalConverter(Class definedIn, String fieldName)booleanisIgnoredElement(String name)booleanisImmutableValueType(Class type)booleanisReferenceable(Class type)com.thoughtworks.xstream.mapper.MapperlookupMapperOfType(Class type)ClassrealClass(String elementName)StringrealMember(Class type, String serialized)StringserializedClass(Class type)StringserializedMember(Class type, String memberName)booleanshouldSerializeMember(Class definedIn, String fieldName)
-
-
-
Method Detail
-
serializedClass
public String serializedClass(Class type)
- Specified by:
serializedClassin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
serializedClassin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
realClass
public Class realClass(String elementName)
- Specified by:
realClassin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
realClassin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
serializedMember
public String serializedMember(Class type, String memberName)
- Specified by:
serializedMemberin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
serializedMemberin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
realMember
public String realMember(Class type, String serialized)
- Specified by:
realMemberin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
realMemberin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
isImmutableValueType
public boolean isImmutableValueType(Class type)
- Specified by:
isImmutableValueTypein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
isImmutableValueTypein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
defaultImplementationOf
public Class defaultImplementationOf(Class type)
- Specified by:
defaultImplementationOfin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
defaultImplementationOfin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
aliasForAttribute
public String aliasForAttribute(String attribute)
- Specified by:
aliasForAttributein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
aliasForAttributein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
attributeForAlias
public String attributeForAlias(String alias)
- Specified by:
attributeForAliasin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
attributeForAliasin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
aliasForSystemAttribute
public String aliasForSystemAttribute(String attribute)
- Specified by:
aliasForSystemAttributein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
aliasForSystemAttributein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getFieldNameForItemTypeAndName
public String getFieldNameForItemTypeAndName(Class definedIn, Class itemType, String itemFieldName)
- Specified by:
getFieldNameForItemTypeAndNamein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getFieldNameForItemTypeAndNamein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getItemTypeForItemFieldName
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName)
- Specified by:
getItemTypeForItemFieldNamein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getItemTypeForItemFieldNamein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getImplicitCollectionDefForFieldName
public com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName)
- Specified by:
getImplicitCollectionDefForFieldNamein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getImplicitCollectionDefForFieldNamein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
shouldSerializeMember
public boolean shouldSerializeMember(Class definedIn, String fieldName)
- Specified by:
shouldSerializeMemberin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
shouldSerializeMemberin 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:
getConverterFromItemTypein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getConverterFromItemTypein 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:
getConverterFromItemTypein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getConverterFromItemTypein 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:
getConverterFromAttributein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getConverterFromAttributein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getLocalConverter
public com.thoughtworks.xstream.converters.Converter getLocalConverter(Class definedIn, String fieldName)
- Specified by:
getLocalConverterin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getLocalConverterin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
lookupMapperOfType
public com.thoughtworks.xstream.mapper.Mapper lookupMapperOfType(Class type)
- Specified by:
lookupMapperOfTypein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
lookupMapperOfTypein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromItemType
public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromItemType(String fieldName, Class type, Class definedIn)
- Specified by:
getConverterFromItemTypein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getConverterFromItemTypein 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:
aliasForAttributein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
aliasForAttributein 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:
attributeForAliasin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
attributeForAliasin 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:
getConverterFromAttributein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getConverterFromAttributein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
getConverterFromAttribute
public com.thoughtworks.xstream.converters.SingleValueConverter getConverterFromAttribute(Class definedIn, String attribute, Class type)
- Specified by:
getConverterFromAttributein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
getConverterFromAttributein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
isIgnoredElement
public boolean isIgnoredElement(String name)
- Specified by:
isIgnoredElementin interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
isIgnoredElementin classcom.thoughtworks.xstream.mapper.MapperWrapper
-
isReferenceable
public boolean isReferenceable(Class type)
- Specified by:
isReferenceablein interfacecom.thoughtworks.xstream.mapper.Mapper- Overrides:
isReferenceablein classcom.thoughtworks.xstream.mapper.MapperWrapper
-
-