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 java.lang.Object implements Converter, Caching
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractReflectionConverter.DuplicateFieldException
static class
AbstractReflectionConverter.UnknownFieldException
-
Field Summary
Fields Modifier and Type Field Description protected Mapper
mapper
protected ReflectionProvider
reflectionProvider
protected SerializationMembers
serializationMembers
protected SerializationMethodInvoker
serializationMethodInvoker
Deprecated.As of 1.4.8, useserializationMembers
.
-
Constructor Summary
Constructors Constructor Description AbstractReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canAccess(java.lang.Class type)
protected void
doMarshal(java.lang.Object source, HierarchicalStreamWriter writer, MarshallingContext context)
java.lang.Object
doUnmarshal(java.lang.Object result, HierarchicalStreamReader reader, UnmarshallingContext context)
void
flushCache()
protected java.lang.Object
instantiateNewInstance(HierarchicalStreamReader reader, UnmarshallingContext context)
void
marshal(java.lang.Object original, HierarchicalStreamWriter writer, MarshallingContext context)
Convert an object to textual data.protected void
marshallField(MarshallingContext context, java.lang.Object newObj, java.lang.reflect.Field field)
protected java.lang.Object
readResolve()
protected boolean
shouldUnmarshalField(java.lang.reflect.Field field)
protected boolean
shouldUnmarshalTransientFields()
java.lang.Object
unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
Convert textual data back into an object.protected java.lang.Object
unmarshallField(UnmarshallingContext context, java.lang.Object result, java.lang.Class type, java.lang.reflect.Field field)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.thoughtworks.xstream.converters.ConverterMatcher
canConvert
-
-
-
-
Field Detail
-
reflectionProvider
protected final ReflectionProvider reflectionProvider
-
mapper
protected final Mapper mapper
-
serializationMethodInvoker
protected transient SerializationMethodInvoker serializationMethodInvoker
Deprecated.As of 1.4.8, useserializationMembers
.
-
serializationMembers
protected transient SerializationMembers serializationMembers
-
-
Constructor Detail
-
AbstractReflectionConverter
public AbstractReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider)
-
-
Method Detail
-
canAccess
protected boolean canAccess(java.lang.Class type)
-
marshal
public void marshal(java.lang.Object original, HierarchicalStreamWriter writer, MarshallingContext context)
Description copied from interface:Converter
Convert an object to textual data.
-
doMarshal
protected void doMarshal(java.lang.Object source, HierarchicalStreamWriter writer, MarshallingContext context)
-
marshallField
protected void marshallField(MarshallingContext context, java.lang.Object newObj, java.lang.reflect.Field field)
-
unmarshal
public java.lang.Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
Description copied from interface:Converter
Convert textual data back into an object.
-
doUnmarshal
public java.lang.Object doUnmarshal(java.lang.Object result, HierarchicalStreamReader reader, UnmarshallingContext context)
-
unmarshallField
protected java.lang.Object unmarshallField(UnmarshallingContext context, java.lang.Object result, java.lang.Class type, java.lang.reflect.Field field)
-
shouldUnmarshalTransientFields
protected boolean shouldUnmarshalTransientFields()
-
shouldUnmarshalField
protected boolean shouldUnmarshalField(java.lang.reflect.Field field)
-
instantiateNewInstance
protected java.lang.Object instantiateNewInstance(HierarchicalStreamReader reader, UnmarshallingContext context)
-
flushCache
public void flushCache()
- Specified by:
flushCache
in interfaceCaching
-
readResolve
protected java.lang.Object readResolve()
-
-