| java.lang.Object java.io.EmulatedFields
Inner Class :static class ObjectSlot | |
Method Summary | |
public 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. | public byte | get(String name, byte defaultValue) Find and return the byte value of a given field named name
in the receiver. | public char | get(String name, char defaultValue) Find and return the char value of a given field named name
in the receiver. | public double | get(String name, double defaultValue) Find and return the double value of a given field named name
in the receiver. | public float | get(String name, float defaultValue) Find and return the float value of a given field named name
in the receiver. | public int | get(String name, int defaultValue) Find and return the int value of a given field named name
in the receiver. | public long | get(String name, long defaultValue) Find and return the long value of a given field named name
in the receiver. | public Object | get(String name, Object defaultValue) Find and return the Object value of a given field named name
in the receiver. | public short | get(String name, short defaultValue) Find and return the short value of a given field named name
in the receiver. | public boolean | get(String name, boolean defaultValue) Find and return the boolean value of a given field named
name in the receiver. | public void | put(String name, byte value) Find and set the byte value of a given field named name in
the receiver. | public void | put(String name, char value) Find and set the char value of a given field named name in
the receiver. | public void | put(String name, double value) Find and set the double value of a given field named name
in the receiver. | public void | put(String name, float value) Find and set the float value of a given field named name
in the receiver. | public void | put(String name, int value) Find and set the int value of a given field named name in
the receiver. | public void | put(String name, long value) Find and set the long value of a given field named name in
the receiver. | public void | put(String name, Object value) Find and set the Object value of a given field named name
in the receiver. | public void | put(String name, short value) Find and set the short value of a given field named name
in the receiver. | public void | put(String name, boolean value) Find and set the boolean value of a given field named name
in the receiver. | public ObjectSlot[] | slots() Return the array of ObjectSlot the receiver represents. |
EmulatedFields | public EmulatedFields(ObjectStreamField[] fields, ObjectStreamField[] declared)(Code) | | Constructs a new instance of EmulatedFields.
Parameters: fields - an array of ObjectStreamFields, which describe the fields tobe emulated (names, types, etc). Parameters: declared - an array of ObjectStreamFields, which describe the declaredfields. |
defaulted | public boolean defaulted(String name) throws IllegalArgumentException(Code) | | 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.
Parameters: name - a String, the name of the field to test true if name still holds itsdefault value, false otherwise throws: IllegalArgumentException - If name is null |
get | public byte get(String name, byte defaultValue) throws IllegalArgumentException(Code) | | Find and return the byte value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public char get(String name, char defaultValue) throws IllegalArgumentException(Code) | | Find and return the char value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public double get(String name, double defaultValue) throws IllegalArgumentException(Code) | | Find and return the double value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public float get(String name, float defaultValue) throws IllegalArgumentException(Code) | | Find and return the float value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public int get(String name, int defaultValue) throws IllegalArgumentException(Code) | | Find and return the int value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public long get(String name, long defaultValue) throws IllegalArgumentException(Code) | | Find and return the long value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public Object get(String name, Object defaultValue) throws IllegalArgumentException(Code) | | Find and return the Object value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public short get(String name, short defaultValue) throws IllegalArgumentException(Code) | | Find and return the short value of a given field named name
in the receiver. If the field has not been assigned any value yet, the
default value defaultValue is returned instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
get | public boolean get(String name, boolean defaultValue) throws IllegalArgumentException(Code) | | Find and return the boolean value of a given field named
name in the receiver. If the field has not been assigned
any value yet, the default value defaultValue is returned
instead.
Parameters: name - A String, the name of the field to find Parameters: defaultValue - Return value in case the field has not been assigned to yet. the value of the given field if it has been assigned, the defaultvalue otherwise throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, byte value) throws IllegalArgumentException(Code) | | Find and set the byte value of a given field named name in
the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, char value) throws IllegalArgumentException(Code) | | Find and set the char value of a given field named name in
the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, double value) throws IllegalArgumentException(Code) | | Find and set the double value of a given field named name
in the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, float value) throws IllegalArgumentException(Code) | | Find and set the float value of a given field named name
in the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, int value) throws IllegalArgumentException(Code) | | Find and set the int value of a given field named name in
the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, long value) throws IllegalArgumentException(Code) | | Find and set the long value of a given field named name in
the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, Object value) throws IllegalArgumentException(Code) | | Find and set the Object value of a given field named name
in the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, short value) throws IllegalArgumentException(Code) | | Find and set the short value of a given field named name
in the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
put | public void put(String name, boolean value) throws IllegalArgumentException(Code) | | Find and set the boolean value of a given field named name
in the receiver.
Parameters: name - A String, the name of the field to set Parameters: value - New value for the field. throws: IllegalArgumentException - If the corresponding field can not be found. |
slots | public ObjectSlot[] slots()(Code) | | Return the array of ObjectSlot the receiver represents.
array of ObjectSlot the receiver represents. |
|
|