com.thoughtworks.xstream.converters.reflection
Class AbstractReflectionConverter
java.lang.Object
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
- All Implemented Interfaces:
- Converter, ConverterMatcher, Caching
- Direct Known Subclasses:
- ReflectionConverter, SerializableConverter
public abstract class AbstractReflectionConverter
- extends Object
- implements Converter, Caching
Method Summary |
protected void |
doMarshal(Object source,
HierarchicalStreamWriter writer,
MarshallingContext context)
|
Object |
doUnmarshal(Object result,
HierarchicalStreamReader reader,
UnmarshallingContext context)
|
void |
flushCache()
|
protected Object |
instantiateNewInstance(HierarchicalStreamReader reader,
UnmarshallingContext context)
|
void |
marshal(Object original,
HierarchicalStreamWriter writer,
MarshallingContext context)
Convert an object to textual data. |
protected void |
marshallField(MarshallingContext context,
Object newObj,
Field field)
|
protected boolean |
shouldUnmarshalTransientFields()
|
Object |
unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context)
Convert textual data back into an object. |
protected Object |
unmarshallField(UnmarshallingContext context,
Object result,
Class type,
Field field)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reflectionProvider
protected final ReflectionProvider reflectionProvider
mapper
protected final Mapper mapper
serializationMethodInvoker
protected transient SerializationMethodInvoker serializationMethodInvoker
AbstractReflectionConverter
public AbstractReflectionConverter(Mapper mapper,
ReflectionProvider reflectionProvider)
marshal
public void marshal(Object original,
HierarchicalStreamWriter writer,
MarshallingContext context)
- Description copied from interface:
Converter
- Convert an object to textual data.
- Specified by:
marshal
in interface Converter
- Parameters:
original
- The object to be marshalled.writer
- A stream to write to.context
- A context that allows nested objects to be processed by XStream.
doMarshal
protected void doMarshal(Object source,
HierarchicalStreamWriter writer,
MarshallingContext context)
marshallField
protected void marshallField(MarshallingContext context,
Object newObj,
Field field)
unmarshal
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context)
- Description copied from interface:
Converter
- Convert textual data back into an object.
- Specified by:
unmarshal
in interface Converter
- Parameters:
reader
- The stream to read the text from.
- Returns:
- The resulting object.
doUnmarshal
public Object doUnmarshal(Object result,
HierarchicalStreamReader reader,
UnmarshallingContext context)
unmarshallField
protected Object unmarshallField(UnmarshallingContext context,
Object result,
Class type,
Field field)
shouldUnmarshalTransientFields
protected boolean shouldUnmarshalTransientFields()
instantiateNewInstance
protected Object instantiateNewInstance(HierarchicalStreamReader reader,
UnmarshallingContext context)
flushCache
public void flushCache()
- Specified by:
flushCache
in interface Caching
Copyright © 2004-2014 XStream. All Rights Reserved.