com.thoughtworks.xstream.converters.reflection
Class CGLIBEnhancedConverter
java.lang.Object
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
com.thoughtworks.xstream.converters.reflection.SerializableConverter
com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter
- All Implemented Interfaces:
- Converter, ConverterMatcher, Caching
public class CGLIBEnhancedConverter
- extends SerializableConverter
Converts a proxy created by the CGLIB Enhancer
. Such a proxy is recreated while
deserializing the proxy. The converter does only work, if
- the DefaultNamingPolicy is used for the proxy's name
- the proxy uses a factory or only one Callback is registered
- a possible super class has at least a protected default constructor
Note, that the this converter relies on the CGLIBMapper.
- Since:
- 1.2
- Author:
- Jörg Schaible
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CGLIBEnhancedConverter
public CGLIBEnhancedConverter(Mapper mapper,
ReflectionProvider reflectionProvider,
ClassLoader classLoader)
CGLIBEnhancedConverter
public CGLIBEnhancedConverter(Mapper mapper,
ReflectionProvider reflectionProvider)
- Deprecated. As of 1.4 use
CGLIBEnhancedConverter(Mapper, ReflectionProvider, ClassLoader)
canConvert
public boolean canConvert(Class type)
- Description copied from interface:
ConverterMatcher
- Determines whether the converter can marshall a particular type.
- Specified by:
canConvert
in interface ConverterMatcher
- Overrides:
canConvert
in class SerializableConverter
- Parameters:
type
- the Class representing the object type to be converted
marshal
public void marshal(Object source,
HierarchicalStreamWriter writer,
MarshallingContext context)
- Description copied from interface:
Converter
- Convert an object to textual data.
- Specified by:
marshal
in interface Converter
- Overrides:
marshal
in class AbstractReflectionConverter
- Parameters:
source
- The object to be marshalled.writer
- A stream to write to.context
- A context that allows nested objects to be processed by XStream.
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
- Overrides:
unmarshal
in class AbstractReflectionConverter
- Parameters:
reader
- The stream to read the text from.
- Returns:
- The resulting object.
hierarchyFor
protected List hierarchyFor(Class type)
- Overrides:
hierarchyFor
in class SerializableConverter
Copyright © 2004-2014 XStream. All Rights Reserved.