public class CGLIBEnhancedConverter extends SerializableConverter
Enhancer
. Such a proxy is recreated while
deserializing the proxy. The converter does only work, ifAbstractReflectionConverter.DuplicateFieldException, AbstractReflectionConverter.UnknownFieldException
mapper, reflectionProvider, serializationMembers, serializationMethodInvoker
Constructor and Description |
---|
CGLIBEnhancedConverter(Mapper mapper,
ReflectionProvider reflectionProvider)
Deprecated.
|
CGLIBEnhancedConverter(Mapper mapper,
ReflectionProvider reflectionProvider,
java.lang.ClassLoader classLoader)
Deprecated.
|
CGLIBEnhancedConverter(Mapper mapper,
ReflectionProvider reflectionProvider,
ClassLoaderReference classLoaderReference)
Construct a CGLIBEnhancedConverter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(java.lang.Class type)
Determines whether the converter can marshall a particular type.
|
protected java.util.List |
hierarchyFor(java.lang.Class type) |
void |
marshal(java.lang.Object source,
HierarchicalStreamWriter writer,
MarshallingContext context)
Convert an object to textual data.
|
protected java.lang.Object |
readResolve() |
java.lang.Object |
unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context)
Convert textual data back into an object.
|
doMarshal, doMarshalConditionally, doUnmarshal, doUnmarshalConditionally, marshalUnserializableParent
canAccess, flushCache, instantiateNewInstance, marshallField, shouldUnmarshalField, shouldUnmarshalTransientFields, unmarshallField
public CGLIBEnhancedConverter(Mapper mapper, ReflectionProvider reflectionProvider, ClassLoaderReference classLoaderReference)
mapper
- the mapper chain instancereflectionProvider
- the reflection providerclassLoaderReference
- the reference to the ClassLoader
of the XStream instancepublic CGLIBEnhancedConverter(Mapper mapper, ReflectionProvider reflectionProvider, java.lang.ClassLoader classLoader)
CGLIBEnhancedConverter(Mapper, ReflectionProvider, ClassLoaderReference)
public CGLIBEnhancedConverter(Mapper mapper, ReflectionProvider reflectionProvider)
CGLIBEnhancedConverter(Mapper, ReflectionProvider, ClassLoaderReference)
public boolean canConvert(java.lang.Class type)
ConverterMatcher
canConvert
in interface ConverterMatcher
canConvert
in class SerializableConverter
type
- the Class representing the object type to be convertedpublic void marshal(java.lang.Object source, HierarchicalStreamWriter writer, MarshallingContext context)
Converter
marshal
in interface Converter
marshal
in class AbstractReflectionConverter
source
- The object to be marshalled.writer
- A stream to write to.context
- A context that allows nested objects to be processed by XStream.public java.lang.Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
Converter
unmarshal
in interface Converter
unmarshal
in class AbstractReflectionConverter
reader
- The stream to read the text from.protected java.util.List hierarchyFor(java.lang.Class type)
hierarchyFor
in class SerializableConverter
protected java.lang.Object readResolve()
readResolve
in class AbstractReflectionConverter
Copyright © 2004–2024 XStream. All rights reserved.