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
- 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
- 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)
canConvert
public boolean canConvert(java.lang.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
marshal
public void marshal(java.lang.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
unmarshal
public java.lang.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
hierarchyFor
protected java.util.List hierarchyFor(java.lang.Class type)
- Overrides:
hierarchyFor
in class SerializableConverter
Joe Walnes, http://xstream.codehaus.org/