com.threerings.export
Class FieldMarshaller

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

public abstract class FieldMarshaller
extends Object

Used to read and write individual fields.


Constructor Summary
FieldMarshaller()
           
 
Method Summary
static FieldMarshaller getFieldMarshaller(Field field)
          Retrieves a field marshaller for the specified field.
abstract  void readField(Field field, String name, Object target, Object prototype, Importer importer)
          Reads the contents of the supplied field from the supplied importer and sets it in the object.
abstract  void writeField(Field field, String name, Object source, Object prototype, Exporter exporter)
          Writes the contents of the supplied field in the supplied object to the exporter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldMarshaller

public FieldMarshaller()
Method Detail

getFieldMarshaller

public static FieldMarshaller getFieldMarshaller(Field field)
Retrieves a field marshaller for the specified field.


readField

public abstract void readField(Field field,
                               String name,
                               Object target,
                               Object prototype,
                               Importer importer)
                        throws IOException,
                               IllegalAccessException
Reads the contents of the supplied field from the supplied importer and sets it in the object.

Throws:
IOException
IllegalAccessException

writeField

public abstract void writeField(Field field,
                                String name,
                                Object source,
                                Object prototype,
                                Exporter exporter)
                         throws IOException,
                                IllegalAccessException
Writes the contents of the supplied field in the supplied object to the exporter.

Throws:
IOException
IllegalAccessException


Copyright © 2011. All Rights Reserved.