Top Description Fields Constructors Methods
com.thoughtworks.xstream.annotations

public Class AnnotationReflectionConverter

extends ReflectionConverter
Class Inheritance
Annotations
@Deprecated
Imports
java.lang.reflect.Field, .InvocationTargetException, java.util.HashMap, .Map, com.thoughtworks.xstream.converters.Converter, .ConverterMatcher, .MarshallingContext, .SingleValueConverter, .SingleValueConverterWrapper, .UnmarshallingContext, com.thoughtworks.xstream.converters.reflection.ObjectAccessException, .ReflectionConverter, .ReflectionProvider, com.thoughtworks.xstream.mapper.Mapper

Deprecated

As of 1.3, build into ReflectionConverter

ReflectionConverter which uses an AnnotationProvider to marshall and unmarshall fields based on the annotated converters.
Authors
Guilherme Silveira, Mauro Talevi

Field Summary

Modifier and TypeField and Description
private final AnnotationProvider
annotationProvider

Deprecated as a consequence of AnnotationProvider being deprecated.
private final Map<Class<? extends ConverterMatcher>, Converter>

Constructor Summary

AccessConstructor and Description
public
AnnotationReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider, AnnotationProvider annotationProvider)

Deprecated

Method Summary

Modifier and TypeMethod and Description
private void
protected void
private Converter

Returns:

the new instance
newInstance
(Class<? extends ConverterMatcher>
the converter type to instantiate
type
)

Instantiates a converter using its default constructor.

protected Object
Inherited from com.thoughtworks.xstream.converters.reflection.ReflectionConverter:
canConvert

Field Detail

annotationProviderback to summary
private final AnnotationProvider annotationProvider

Deprecated

as a consequence of AnnotationProvider being deprecated. See corresponding docs for further information.

cachedConvertersback to summary
private final Map<Class<? extends ConverterMatcher>, Converter> cachedConverters

Constructor Detail

AnnotationReflectionConverterback to summary
public AnnotationReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider, AnnotationProvider annotationProvider)

Deprecated

Annotations
@Deprecated

Method Detail

ensureCacheback to summary
private void ensureCache(Class<? extends ConverterMatcher> type)
marshallFieldback to summary
protected void marshallField(final MarshallingContext context, Object newObj, Field field)

Overrides com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField.

newInstanceback to summary
private Converter newInstance(Class<? extends ConverterMatcher> type)

Instantiates a converter using its default constructor.

Parameters
type:Class<? extends ConverterMatcher>

the converter type to instantiate

Returns:Converter

the new instance

unmarshallFieldback to summary
protected Object unmarshallField(final UnmarshallingContext context, final Object result, Class<T> type, Field field)

Overrides com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField.