Class AnnotationMapper
java.lang.Object
com.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.AnnotationMapper
- All Implemented Interfaces:
AnnotationConfiguration, Mapper
A mapper that uses annotations to prepare the remaining mappers in the chain.
- Since:
- 1.3
- Author:
- Jörg Schaible
-
Nested Class Summary
Nested classes/interfaces inherited from interface Mapper
Mapper.ImplicitCollectionMapping, Mapper.Null -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationMapper(Mapper wrapped, ConverterRegistry converterRegistry, ConverterLookup converterLookup, ClassLoaderReference classLoaderReference, ReflectionProvider reflectionProvider) Construct an AnnotationMapper.AnnotationMapper(Mapper wrapped, ConverterRegistry converterRegistry, ConverterLookup converterLookup, ClassLoader classLoader, ReflectionProvider reflectionProvider, JVM jvm) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidautodetectAnnotations(boolean mode) defaultImplementationOf(Class type) getLocalConverter(Class definedIn, String fieldName) voidprocessAnnotations(Class[] initialTypes) realMember(Class type, String serialized) How a serialized member representation should be mapped back to a real member.serializedClass(Class type) How a class name should be represented in its serialized form.Methods inherited from class MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, serializedMember, shouldSerializeMember
-
Constructor Details
-
AnnotationMapper
public AnnotationMapper(Mapper wrapped, ConverterRegistry converterRegistry, ConverterLookup converterLookup, ClassLoaderReference classLoaderReference, ReflectionProvider reflectionProvider) Construct an AnnotationMapper.- Parameters:
wrapped- the nextMapperin the chain- Since:
- 1.4.5
-
AnnotationMapper
public AnnotationMapper(Mapper wrapped, ConverterRegistry converterRegistry, ConverterLookup converterLookup, ClassLoader classLoader, ReflectionProvider reflectionProvider, JVM jvm) Deprecated.Construct an AnnotationMapper.- Parameters:
wrapped- the nextMapperin the chain- Since:
- 1.3
-
-
Method Details
-
realMember
Description copied from interface:MapperHow a serialized member representation should be mapped back to a real member.- Specified by:
realMemberin interfaceMapper- Overrides:
realMemberin classMapperWrapper
-
serializedClass
Description copied from interface:MapperHow a class name should be represented in its serialized form.- Specified by:
serializedClassin interfaceMapper- Overrides:
serializedClassin classMapperWrapper
-
defaultImplementationOf
- Specified by:
defaultImplementationOfin interfaceMapper- Overrides:
defaultImplementationOfin classMapperWrapper
-
getLocalConverter
- Specified by:
getLocalConverterin interfaceMapper- Overrides:
getLocalConverterin classMapperWrapper
-
autodetectAnnotations
public void autodetectAnnotations(boolean mode) - Specified by:
autodetectAnnotationsin interfaceAnnotationConfiguration
-
processAnnotations
- Specified by:
processAnnotationsin interfaceAnnotationConfiguration
-
AnnotationMapper(Mapper, ConverterRegistry, ConverterLookup, ClassLoaderReference, ReflectionProvider)