|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.ObjectStreamField
public class ObjectStreamField
This class represents object fields that are saved to the stream, by serialization. Classes can define the collection of fields to be dumped, which can differ from the actual object's declared fields.
ObjectOutputStream.writeFields(),
ObjectInputStream.readFields()| Field Summary | |
|---|---|
(package private) int |
offset
|
| Constructor Summary | |
|---|---|
ObjectStreamField(String name,
Class<?> cl)
Constructs an ObjectStreamField with the given name and the given type |
|
ObjectStreamField(String name,
Class<?> cl,
boolean unshared)
Constructs an ObjectStreamField with the given name and the given type |
|
ObjectStreamField(String signature,
String name)
Constructs an ObjectStreamField with the given name and the given type. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Comparing the receiver to the parameter, according to the Comparable interface. |
boolean |
equals(Object arg0)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
String |
getName()
Return the name of the field the receiver represents |
int |
getOffset()
Return the offset of this field in the object |
Class<?> |
getType()
Return the type of the field the receiver represents |
char |
getTypeCode()
Return the type code that corresponds to the class the receiver represents |
(package private) Class<?> |
getTypeInternal()
Return the type of the field the receiver represents, this is an internal method |
String |
getTypeString()
Return the type signature used by the VM to represent the type for this field. |
int |
hashCode()
Returns an integer hash code for the receiver. |
boolean |
isPrimitive()
Return a boolean indicating whether the class of this field is a primitive type or not |
boolean |
isUnshared()
Returns whether this serialized field is unshared. |
(package private) void |
resolve(ClassLoader loader)
|
protected void |
setOffset(int newValue)
Set the offset this field represents in the object |
(package private) void |
setUnshared(boolean unshared)
|
(package private) static void |
sortFields(ObjectStreamField[] fields)
Sorts the fields for dumping. |
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int offset
| Constructor Detail |
|---|
public ObjectStreamField(String name,
Class<?> cl)
name - a String, the name of the fieldcl - A Class object representing the type of the field
public ObjectStreamField(String name,
Class<?> cl,
boolean unshared)
name - a String, the name of the fieldcl - A Class object representing the type of the fieldunshared - write and read the field unshared
ObjectStreamField(String signature,
String name)
signature - A String representing the type of the fieldname - a String, the name of the field, or null| Method Detail |
|---|
public int compareTo(Object o)
compareTo in interface Comparable<Object>o - The object to compare against
public boolean equals(Object arg0)
Object
equals in class Objectarg0 - Object the object to compare with this object.
true if the object is the same as this
object false if it is different from this object.Object.hashCode()public int hashCode()
Objecttrue when passed to .equals must
answer the same value for this method.
hashCode in class ObjectObject.equals(java.lang.Object)public String getName()
public int getOffset()
Class<?> getTypeInternal()
public Class<?> getType()
public char getTypeCode()
public String getTypeString()
public boolean isPrimitive()
protected void setOffset(int newValue)
newValue - an int, the offsetpublic String toString()
toString in class Objectstatic void sortFields(ObjectStreamField[] fields)
fields - ObjectStreamField[] fields to be sortedvoid resolve(ClassLoader loader)
public boolean isUnshared()
void setUnshared(boolean unshared)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||