com.threerings.export
Class ObjectMarshaller

java.lang.Object
  extended by com.threerings.export.ObjectMarshaller

public class ObjectMarshaller
extends Object

Used to read and write object fields.


Method Summary
static ObjectMarshaller getObjectMarshaller(Class<?> clazz)
          Retrieves or creates a marshaller for objects of the specified class.
 Object getPrototype()
          Returns a reference to the prototype object (used to determine field defaults).
 void readFields(Object object, Importer importer, boolean useReader)
          Reads the fields of an object from the specified importer.
 void writeFields(Object object, Exporter exporter, boolean useWriter)
          Writes the fields of an object to the specified exporter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getObjectMarshaller

public static ObjectMarshaller getObjectMarshaller(Class<?> clazz)
Retrieves or creates a marshaller for objects of the specified class.


getPrototype

public Object getPrototype()
Returns a reference to the prototype object (used to determine field defaults).


readFields

public void readFields(Object object,
                       Importer importer,
                       boolean useReader)
                throws IOException
Reads the fields of an object from the specified importer.

Throws:
IOException

writeFields

public void writeFields(Object object,
                        Exporter exporter,
                        boolean useWriter)
                 throws IOException
Writes the fields of an object to the specified exporter.

Throws:
IOException


Copyright © 2011. All Rights Reserved.