|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.ObjectInputStream.GetField
java.io.EmulatedFieldsForLoading
class EmulatedFieldsForLoading
An EmulatedFieldsForLoading is an object that represents a set of emulated fields for an object being loaded. It is a concrete implementation for ObjectInputStream.GetField
ObjectInputStream.GetField,
EmulatedFieldsForDumping| Constructor Summary | |
|---|---|
EmulatedFieldsForLoading(ObjectStreamClass streamClass)
Constructs a new instance of EmulatedFieldsForDumping. |
|
| Method Summary | |
|---|---|
boolean |
defaulted(String name)
Return a boolean indicating if the field named name has
been assigned a value explicitly (false) or if it still holds a default
value for the type (true) because it hasn't been assigned to yet. |
(package private) EmulatedFields |
emulatedFields()
Return the actual EmulatedFields instance used by the receiver. |
boolean |
get(String name,
boolean defaultValue)
Find and return the boolean value of a given field named name in the receiver. |
byte |
get(String name,
byte defaultValue)
Find and return the byte value of a given field named name
in the receiver. |
char |
get(String name,
char defaultValue)
Find and return the char value of a given field named name
in the receiver. |
double |
get(String name,
double defaultValue)
Find and return the double value of a given field named name
in the receiver. |
float |
get(String name,
float defaultValue)
Find and return the float value of a given field named name
in the receiver. |
int |
get(String name,
int defaultValue)
Find and return the int value of a given field named name
in the receiver. |
long |
get(String name,
long defaultValue)
Find and return the long value of a given field named name
in the receiver. |
Object |
get(String name,
Object defaultValue)
Find and return the Object value of a given field named name
in the receiver. |
short |
get(String name,
short defaultValue)
Find and return the short value of a given field named name
in the receiver. |
ObjectStreamClass |
getObjectStreamClass()
Return the class descriptor for which the emulated fields are defined. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
EmulatedFieldsForLoading(ObjectStreamClass streamClass)
streamClass - an ObjectStreamClass, defining the class for which to emulate
fields.| Method Detail |
|---|
public boolean defaulted(String name)
throws IOException,
IllegalArgumentException
name has
been assigned a value explicitly (false) or if it still holds a default
value for the type (true) because it hasn't been assigned to yet.
defaulted in class ObjectInputStream.GetFieldname - A String, the name of the field to test
true if the field holds it default value,
false otherwise.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.EmulatedFields emulatedFields()
public byte get(String name,
byte defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public char get(String name,
char defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public double get(String name,
double defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public float get(String name,
float defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public int get(String name,
int defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public long get(String name,
long defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public Object get(String name,
Object defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public short get(String name,
short defaultValue)
throws IOException,
IllegalArgumentException
name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.
public boolean get(String name,
boolean defaultValue)
throws IOException,
IllegalArgumentException
name in the receiver. If the field has not been assigned
any value yet, the default value defaultValue is returned
instead.
get in class ObjectInputStream.GetFieldname - A String, the name of the field to finddefaultValue - Return value in case the field has not been assigned to yet.
IOException - If an IO error occurs
IllegalArgumentException - If the corresponding field can not be found.public ObjectStreamClass getObjectStreamClass()
getObjectStreamClass in class ObjectInputStream.GetField
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||