This class represents a named field of a specified type (i.e., a specified Class). When a class serializes itself by writing a set of fields that are different from the fields it uses in its own implementation, it defines the set of fields to be written with an array of ObjectStreamField objects. This array should be the value of a private static field named serialPersistentFields. The methods of this class are used internally by the serialization mechanism and are not typically used elsewhere. See also ObjectOutputStream.PutField and ObjectInputStream.GetField.
public classObjectStreamField implements Comparable<Object> { // Public Constructors public
ObjectStreamField (String
name , Class<?>
type );
1.4 public
ObjectStreamField (String
name , Class<?>
type , boolean
unshared ); // Public Instance Methods public String
getName ( ); public int
getOffset ( ); public Class<?>
getType ( ); public char
getTypeCode ( ); public String
getTypeString ( ); public boolean
isPrimitive ( );
1.4 public boolean
isUnshared ( ); // Methods Implementing Comparable public int
compareTo (Object
obj ); // Public Methods Overriding Object public String
toString ( ); // Protected Instance Methods protected void
setOffset (int
offset ); }
ObjectStreamClass.{getField( ), getFields( )}
ObjectStreamClass.NO_FIELDS