Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.converters.reflection
Class SerializableConverter

    java.lang.Object
      com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
          com.thoughtworks.xstream.converters.reflection.SerializableConverter

All Implemented Interfaces:
  Converter, ConverterMatcher

Direct Known Subclasses:
  CGLIBEnhancedConverter

    public class SerializableConverter

extends AbstractReflectionConverter

Emulates the mechanism used by standard Java Serialization for classes that implement java.io.Serializable AND implement or inherit a custom readObject()/writeObject() method.

### Supported features of serialization

- readObject(), writeObject()
- class inheritance
- readResolve(), writeReplace()

### Currently unsupported features

- putFields(), writeFields(), readFields()
- ObjectStreamField[] serialPersistentFields
- ObjectInputValidation

Author:
  Joe Walnes, Jörg Schaible

Nested Class Summary

Nested classes/interfaces inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
`AbstractReflectionConverter.DuplicateFieldException`

Field Summary

Fields inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
`mapper, reflectionProvider, serializationMethodInvoker`

Constructor Summary
`SerializableConverter(Mapper mapper, ReflectionProvider reflectionProvider)`

Method Summary
`boolean` | `canConvert(Class type)` Determines whether the converter can marshall a particular type.
`void` | `doMarshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context)`
`protected void` | `doMarshalConditionally(Object source, HierarchicalStreamWriter writer, MarshallingContext context)`
`Object` | `doUnmarshal(Object result, HierarchicalStreamReader reader, UnmarshallingContext context)`
`protected Object` | `doUnmarshalConditionally(Object result, HierarchicalStreamReader reader, UnmarshallingContext context)`
`protected List` | `hierarchyFor(Class type)`

Methods inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
`instantiateNewInstance, marshal, marshallField, shouldUnmarshalTransientFields, unmarshal, unmarshallField`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SerializableConverter

    public SerializableConverter(Mapper mapper,
                                 ReflectionProvider reflectionProvider)

Method Detail

### canConvert

    public boolean canConvert(Class type)

  Description copied from interface: `ConverterMatcher`
  Determines whether the converter can marshall a particular type.

  Parameters:
    `type` - the Class representing the object type to be converted

### doMarshal

    public void doMarshal(Object source,
                          HierarchicalStreamWriter writer,
                          MarshallingContext context)

  Overrides:
    `doMarshal` in class `AbstractReflectionConverter`

### hierarchyFor

    protected List hierarchyFor(Class type)

### doUnmarshal

    public Object doUnmarshal(Object result,
                              HierarchicalStreamReader reader,
                              UnmarshallingContext context)

  Overrides:
    `doUnmarshal` in class `AbstractReflectionConverter`

### doMarshalConditionally

    protected void doMarshalConditionally(Object source,
                                          HierarchicalStreamWriter writer,
                                          MarshallingContext context)

### doUnmarshalConditionally

    protected Object doUnmarshalConditionally(Object result,
                                              HierarchicalStreamReader reader,
                                              UnmarshallingContext context)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.