org.clazzes.remoting.marshal.impl
Class TreeSetObjectMarshaler

java.lang.Object
  extended by org.clazzes.remoting.marshal.impl.TreeSetObjectMarshaler

public class TreeSetObjectMarshaler
extends java.lang.Object

Marshal a TreeMap instance.


Constructor Summary
TreeSetObjectMarshaler()
           
 
Method Summary
 java.lang.reflect.Method getReadResolveMethod()
           
 java.lang.reflect.Method getWriteReplaceMethod()
           
 java.lang.Object readObject(CompactMarshaler context, long ref, ClassInfo ci)
          Instantiate a new instance of the given class info and read the fields.
 void writeObject(CompactMarshaler context, java.lang.Object obj)
          Write the fields of the given object to the
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeSetObjectMarshaler

public TreeSetObjectMarshaler()
Method Detail

getReadResolveMethod

public java.lang.reflect.Method getReadResolveMethod()
Returns:
The readResolve() method of the represented class or null, if this class has not read replacement.

getWriteReplaceMethod

public java.lang.reflect.Method getWriteReplaceMethod()
Returns:
The writeReplace() method of the represented class or null, if this class has not write replacement.

readObject

public java.lang.Object readObject(CompactMarshaler context,
                                   long ref,
                                   ClassInfo ci)
                            throws java.lang.IllegalArgumentException,
                                   java.lang.IllegalAccessException,
                                   java.io.IOException,
                                   java.lang.ClassNotFoundException
Instantiate a new instance of the given class info and read the fields. The implementation of this method is responsible for calling CompactMarshaler.cacheReadPremature(long, Object) right after instantiating the new object instance and before reading the fields. This is necessary in order to handle references to the deserialized object in the object tree.

Parameters:
context - The marshaler at whom's behalf we are acting.
ref - The object reference from the object header.
ci - The class information from the header.
Returns:
A deserialized object.
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.io.IOException
java.lang.ClassNotFoundException

writeObject

public void writeObject(CompactMarshaler context,
                        java.lang.Object obj)
                 throws java.lang.IllegalArgumentException,
                        java.io.IOException,
                        java.lang.IllegalAccessException,
                        java.lang.ClassNotFoundException
Write the fields of the given object to the

Parameters:
context - The marshaler at whom's behalf we are acting.
obj - The object to be written.
Throws:
java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException


Copyright © 2010. All Rights Reserved.