ObjectStreamField


ObjectStreamField java.io

Java 1.2 comparable

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 .

Figure 9-41. java.io.ObjectStreamField

 public class  ObjectStreamField  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  );   } 

Returned By

ObjectStreamClass.{getField( ) , getFields( )}

Type Of

ObjectStreamClass.NO_FIELDS



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net