com.threerings.io
Class FieldMarshaller.MethodFieldMarshaller

java.lang.Object
  extended by com.threerings.io.FieldMarshaller
      extended by com.threerings.io.FieldMarshaller.MethodFieldMarshaller
Enclosing class:
FieldMarshaller

protected static class FieldMarshaller.MethodFieldMarshaller
extends FieldMarshaller

Uses custom accessor methods to read and write a field.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.io.FieldMarshaller
FieldMarshaller.MethodFieldMarshaller, FieldMarshaller.StreamerMarshaller
 
Field Summary
protected  Method _reader
           
protected  Method _writer
           
 
Fields inherited from class com.threerings.io.FieldMarshaller
_internMarshaller, _marshallers, _type, READER_ARGS, WRITER_ARGS
 
Constructor Summary
FieldMarshaller.MethodFieldMarshaller(Method reader, Method writer)
           
 
Method Summary
 void readField(Field field, Object target, ObjectInputStream in)
          Reads the contents of the supplied field from the supplied stream and sets it in the supplied object.
 void writeField(Field field, Object source, ObjectOutputStream out)
          Writes the contents of the supplied field in the supplied object to the supplied stream.
 
Methods inherited from class com.threerings.io.FieldMarshaller
createMarshallers, getFieldMarshaller, getReaderMethodName, getWriterMethodName, toString, useFieldAccessors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_reader

protected Method _reader

_writer

protected Method _writer
Constructor Detail

FieldMarshaller.MethodFieldMarshaller

public FieldMarshaller.MethodFieldMarshaller(Method reader,
                                             Method writer)
Method Detail

readField

public void readField(Field field,
                      Object target,
                      ObjectInputStream in)
               throws Exception
Description copied from class: FieldMarshaller
Reads the contents of the supplied field from the supplied stream and sets it in the supplied object.

Specified by:
readField in class FieldMarshaller
Throws:
Exception

writeField

public void writeField(Field field,
                       Object source,
                       ObjectOutputStream out)
                throws Exception
Description copied from class: FieldMarshaller
Writes the contents of the supplied field in the supplied object to the supplied stream.

Specified by:
writeField in class FieldMarshaller
Throws:
Exception