public abstract class AbstractReflectionConverter extends Object implements Converter, Caching
Modifier and Type | Class and Description |
---|---|
static class |
AbstractReflectionConverter.DuplicateFieldException |
static class |
AbstractReflectionConverter.UnknownFieldException |
Modifier and Type | Field and Description |
---|---|
protected Mapper |
mapper |
protected ReflectionProvider |
reflectionProvider |
protected SerializationMethodInvoker |
serializationMethodInvoker |
Constructor and Description |
---|
AbstractReflectionConverter(Mapper mapper,
ReflectionProvider reflectionProvider) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canAccess(Class type) |
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 |
shouldUnmarshalField(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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canConvert
protected final ReflectionProvider reflectionProvider
protected final Mapper mapper
protected transient SerializationMethodInvoker serializationMethodInvoker
public AbstractReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider)
protected boolean canAccess(Class type)
public void marshal(Object original, HierarchicalStreamWriter writer, MarshallingContext context)
Converter
protected void doMarshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context)
protected void marshallField(MarshallingContext context, Object newObj, Field field)
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
Converter
public Object doUnmarshal(Object result, HierarchicalStreamReader reader, UnmarshallingContext context)
protected Object unmarshallField(UnmarshallingContext context, Object result, Class type, Field field)
protected boolean shouldUnmarshalTransientFields()
protected boolean shouldUnmarshalField(Field field)
protected Object instantiateNewInstance(HierarchicalStreamReader reader, UnmarshallingContext context)
public void flushCache()
flushCache
in interface Caching
Copyright © 2004–2016 XStream. All rights reserved.