| java.lang.Object | |
| ↳ | java.io.ObjectStreamField |
Describes a field for the purpose of serialization. Classes can define the collection of fields that are serialized, which may be different from the set of all declared fields.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Constructs an ObjectStreamField with the specified name and type.
|
||||||||||
|
|
Constructs an ObjectStreamField with the specified name, type and the
indication if it is unshared.
|
||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Compares this field descriptor to the specified one.
|
||||||||||
|
|
Gets the name of this field.
|
||||||||||
|
|
Gets the offset of this field in the object.
|
||||||||||
|
|
Gets the type of this field.
|
||||||||||
|
|
Gets a character code for the type of this field.
|
||||||||||
|
|
Gets the type signature used by the VM to represent the type of this
field.
|
||||||||||
|
|
Indicates whether this field's type is a primitive type.
|
||||||||||
|
|
Indicates whether this field is unshared.
|
||||||||||
|
|
Returns a string containing a concise, human-readable description of this
field descriptor.
|
||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Sets this field's offset in the object.
|
||||||||||
|
[Expand]
Inherited Methods
|
|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
|||||||||||
From interface
java.lang.Comparable
|
|||||||||||
Constructs an ObjectStreamField with the specified name and type.
| name | the name of the field. |
|---|---|
| cl | the type of the field. |
| NullPointerException |
if
name
or
cl
is
null
.
|
|---|
Constructs an ObjectStreamField with the specified name, type and the indication if it is unshared.
| name | the name of the field. |
|---|---|
| cl | the type of the field. |
| unshared |
true
if the field is written and read unshared;
false
otherwise.
|
| NullPointerException |
if
name
or
cl
is
null
.
|
|---|
Compares this field descriptor to the specified one. Checks first if one of the compared fields has a primitive type and the other one not. If so, the field with the primitive type is considered to be "smaller". If both fields are equal, their names are compared.
| o | the object to compare with. |
|---|
o
, 0 if both
fields are equal; 1 if this field is "greater" than field
o
.
Gets the name of this field.
Gets the offset of this field in the object.
Gets the type of this field.
Class
object representing the type of the field.
Gets a character code for the type of this field. The following codes are used:
B byte
C char
D double
F float
I int
J long
L class or interface
S short
Z boolean
[ array
Gets the type signature used by the VM to represent the type of this field.
null
if this
field's type is primitive.
Indicates whether this field's type is a primitive type.
true
if this field's type is primitive;
false
if
the type of this field is a regular class.
Indicates whether this field is unshared.
true
if this field is unshared,
false
otherwise.
Returns a string containing a concise, human-readable description of this field descriptor.
Sets this field's offset in the object.
| newValue | the field's new offset. |
|---|