Home » openjdk-7 » java » io » [javadoc | source]
java.io
class: EmulatedFields [javadoc | source]
java.lang.Object
   java.io.EmulatedFields
An EmulatedFields is an object that represents a set of emulated fields for an object being dumped or loaded. It allows objects to be dumped with a shape different than the fields they were declared to have.
Nested Class Summary:
static class  EmulatedFields.ObjectSlot   
Constructor:
 public EmulatedFields(ObjectStreamField[] fields,
    ObjectStreamField[] declared) 
    Constructs a new instance of EmulatedFields.
    Parameters:
    fields - an array of ObjectStreamFields, which describe the fields to be emulated (names, types, etc).
    declared - an array of ObjectStreamFields, which describe the declared fields.
Method from java.io.EmulatedFields Summary:
defaulted,   get,   get,   get,   get,   get,   get,   get,   get,   get,   put,   put,   put,   put,   put,   put,   put,   put,   put,   slots
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.io.EmulatedFields Detail:
 public boolean defaulted(String name) throws IllegalArgumentException 
    Returns {@code true} indicating the field called {@code name} has not had a value explicitly assigned and that it still holds a default value for its type, or {@code false} indicating that the field named has been assigned a value explicitly.
 public byte get(String name,
    byte defaultValue) throws IllegalArgumentException 
    Finds and returns the byte value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public char get(String name,
    char defaultValue) throws IllegalArgumentException 
    Finds and returns the char value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public double get(String name,
    double defaultValue) throws IllegalArgumentException 
    Finds and returns the double value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public float get(String name,
    float defaultValue) throws IllegalArgumentException 
    Finds and returns the float value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public int get(String name,
    int defaultValue) throws IllegalArgumentException 
    Finds and returns the int value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public long get(String name,
    long defaultValue) throws IllegalArgumentException 
    Finds and returns the long value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public Object get(String name,
    Object defaultValue) throws IllegalArgumentException 
    Finds and returns the Object value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public short get(String name,
    short defaultValue) throws IllegalArgumentException 
    Finds and returns the short value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public boolean get(String name,
    boolean defaultValue) throws IllegalArgumentException 
    Finds and returns the boolean value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead.
 public  void put(String name,
    byte value) throws IllegalArgumentException 
    Find and set the byte value of a given field named {@code name} in the receiver.
 public  void put(String name,
    char value) throws IllegalArgumentException 
    Find and set the char value of a given field named {@code name} in the receiver.
 public  void put(String name,
    double value) throws IllegalArgumentException 
    Find and set the double value of a given field named {@code name} in the receiver.
 public  void put(String name,
    float value) throws IllegalArgumentException 
    Find and set the float value of a given field named {@code name} in the receiver.
 public  void put(String name,
    int value) throws IllegalArgumentException 
    Find and set the int value of a given field named {@code name} in the receiver.
 public  void put(String name,
    long value) throws IllegalArgumentException 
    Find and set the long value of a given field named {@code name} in the receiver.
 public  void put(String name,
    Object value) throws IllegalArgumentException 
    Find and set the Object value of a given field named {@code name} in the receiver.
 public  void put(String name,
    short value) throws IllegalArgumentException 
    Find and set the short value of a given field named {@code name} in the receiver.
 public  void put(String name,
    boolean value) throws IllegalArgumentException 
    Find and set the boolean value of a given field named {@code name} in the receiver.
 public ObjectSlot[] slots() 
    Return the array of ObjectSlot the receiver represents.