Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.io.ObjectStreamField

java.lang.Object
    |
    +----java.io.ObjectStreamField

public class ObjectStreamField
extends Object
implements Comparable
A description of a field in a serializable class. A array of these is used to declare the persistent fields of a class.


Constructor Summary
 ObjectStreamField(String n, Class clazz)
Create a named field with the specified type.
 

Method Summary
int  compareTo(Object o)
Compare this with another ObjectStreamField.
String  getName()
Get the name of this field.
int  getOffset()
 
Class  getType()
Get the type of the field.
char  getTypeCode()
 
String  getTypeString()
 
boolean  isPrimitive()
test if this field is a primitive or not.
void  setOffset(int offset)
 
String  toString()
Return a string describing this field.
boolean  typeEquals(ObjectStreamField other)
Compare the types of two class descriptors.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectStreamField

public ObjectStreamField(String n,
                         Class clazz)
Create a named field with the specified type.
Method Detail

getName

public String getName()
Get the name of this field.

getType

public Class getType()
Get the type of the field.

getTypeCode

public char getTypeCode()

getTypeString

public String getTypeString()

getOffset

public int getOffset()

setOffset

public void setOffset(int offset)

isPrimitive

public boolean isPrimitive()
test if this field is a primitive or not.

compareTo

public int compareTo(Object o)
Compare this with another ObjectStreamField. return -1 if this is smaller, 0 if equal, 1 if greater types that are primitives are "smaller" than objects. if equal, the names are compared.
Implements:
compareTo in interface Comparable

typeEquals

public boolean typeEquals(ObjectStreamField other)
Compare the types of two class descriptors. The match if they have the same primitive types. or if they are both objects and the object types match.

toString

public String toString()
Return a string describing this field.
Overrides:
toString in class Object

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.