com.thoughtworks.xstream.annotations
Class AnnotationReflectionConverter

java.lang.Object
  extended by com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
      extended by com.thoughtworks.xstream.converters.reflection.ReflectionConverter
          extended by com.thoughtworks.xstream.annotations.AnnotationReflectionConverter
All Implemented Interfaces:
Converter, ConverterMatcher

public class AnnotationReflectionConverter
extends ReflectionConverter

ReflectionConverter which uses an AnnotationProvider to marshall and unmarshall fields based on the annotated converters.

Author:
Guilherme Silveira, Mauro Talevi

Nested Class Summary
 
Nested classes/interfaces inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
AbstractReflectionConverter.DuplicateFieldException
 
Field Summary
 
Fields inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
mapper, reflectionProvider, serializationMethodInvoker
 
Constructor Summary
AnnotationReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider, AnnotationProvider annotationProvider)
           
 
Method Summary
protected  void marshallField(MarshallingContext context, java.lang.Object newObj, java.lang.reflect.Field field)
           
protected  java.lang.Object unmarshallField(UnmarshallingContext context, java.lang.Object result, java.lang.Class type, java.lang.reflect.Field field)
           
 
Methods inherited from class com.thoughtworks.xstream.converters.reflection.ReflectionConverter
canConvert
 
Methods inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
doMarshal, doUnmarshal, instantiateNewInstance, marshal, unmarshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationReflectionConverter

public AnnotationReflectionConverter(Mapper mapper,
                                     ReflectionProvider reflectionProvider,
                                     AnnotationProvider annotationProvider)
Method Detail

marshallField

protected void marshallField(MarshallingContext context,
                             java.lang.Object newObj,
                             java.lang.reflect.Field field)
Overrides:
marshallField in class AbstractReflectionConverter

unmarshallField

protected java.lang.Object unmarshallField(UnmarshallingContext context,
                                           java.lang.Object result,
                                           java.lang.Class type,
                                           java.lang.reflect.Field field)
Overrides:
unmarshallField in class AbstractReflectionConverter


Joe Walnes, http://xstream.codehaus.org/