com.thoughtworks.xstream.converters.reflection
Class SerializationMethodInvoker

java.lang.Object
  extended by com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker
All Implemented Interfaces:
Caching

public class SerializationMethodInvoker
extends Object
implements Caching

Convenience wrapper to invoke special serialization methods on objects (and perform reflection caching).

Author:
Joe Walnes, Jörg Schaible

Constructor Summary
SerializationMethodInvoker()
           
 
Method Summary
 void callReadObject(Class type, Object object, ObjectInputStream stream)
           
 Object callReadResolve(Object result)
          Resolves an object as native serialization does by calling readResolve(), if available.
 void callWriteObject(Class type, Object instance, ObjectOutputStream stream)
           
 Object callWriteReplace(Object object)
           
 void flushCache()
           
 boolean supportsReadObject(Class type, boolean includeBaseClasses)
           
 boolean supportsWriteObject(Class type, boolean includeBaseClasses)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationMethodInvoker

public SerializationMethodInvoker()
Method Detail

callReadResolve

public Object callReadResolve(Object result)
Resolves an object as native serialization does by calling readResolve(), if available.


callWriteReplace

public Object callWriteReplace(Object object)

supportsReadObject

public boolean supportsReadObject(Class type,
                                  boolean includeBaseClasses)

callReadObject

public void callReadObject(Class type,
                           Object object,
                           ObjectInputStream stream)

supportsWriteObject

public boolean supportsWriteObject(Class type,
                                   boolean includeBaseClasses)

callWriteObject

public void callWriteObject(Class type,
                            Object instance,
                            ObjectOutputStream stream)

flushCache

public void flushCache()
Specified by:
flushCache in interface Caching


Copyright © 2004-2014 XStream. All Rights Reserved.