Home » openjdk-7 » java » io » [javadoc | source]
java.io
static class: ObjectStreamClass.FieldReflector [javadoc | source]
java.lang.Object
   java.io.ObjectStreamClass$FieldReflector
Class for setting and retrieving serializable field values in batch.
Constructor:
 FieldReflector(ObjectStreamField[] fields) 
    Constructs FieldReflector capable of setting/getting values from the subset of fields whose ObjectStreamFields contain non-null reflective Field objects. ObjectStreamFields with null Fields are treated as filler, for which get operations return default values and set operations discard given values.
Method from java.io.ObjectStreamClass$FieldReflector Summary:
getFields,   getObjFieldValues,   getPrimFieldValues,   setObjFieldValues,   setPrimFieldValues
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.io.ObjectStreamClass$FieldReflector Detail:
 ObjectStreamField[] getFields() 
    Returns list of ObjectStreamFields representing fields operated on by this reflector. The shared/unshared values and Field objects contained by ObjectStreamFields in the list reflect their bindings to locally defined serializable fields.
  void getObjFieldValues(Object obj,
    Object[] vals) 
    Fetches the serializable object field values of object obj and stores them in array vals starting at offset 0. The caller is responsible for ensuring that obj is of the proper type.
  void getPrimFieldValues(Object obj,
    byte[] buf) 
    Fetches the serializable primitive field values of object obj and marshals them into byte array buf starting at offset 0. The caller is responsible for ensuring that obj is of the proper type.
  void setObjFieldValues(Object obj,
    Object[] vals) 
    Sets the serializable object fields of object obj using values from array vals starting at offset 0. The caller is responsible for ensuring that obj is of the proper type; however, attempts to set a field with a value of the wrong type will trigger an appropriate ClassCastException.
  void setPrimFieldValues(Object obj,
    byte[] buf) 
    Sets the serializable primitive fields of object obj using values unmarshalled from byte array buf starting at offset 0. The caller is responsible for ensuring that obj is of the proper type.