Package com.sun.corba.se.impl.io
Class ObjectStreamClass
java.lang.Object
com.sun.corba.se.impl.io.ObjectStreamClass
- All Implemented Interfaces:
Serializable
An ObjectStreamClass describes a class that can be serialized to a stream
or a class that was serialized to a stream. It contains the name
and the serialVersionUID of the class.
The ObjectStreamClass for a specific class loaded in this Java VM can be found using the lookup method.
The ObjectStreamClass for a specific class loaded in this Java VM can be found using the lookup method.
- Since:
- JDK1.1
- Author:
- Roger Riggs
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final longstatic final intstatic final ObjectStreamField[]Set serialPersistentFields of a Serializable class to this value to denote that the class has no Serializable fields. -
Method Summary
Modifier and TypeMethodDescriptionfinal Class<?>forClass()Return the class in the local VM that this version is mapped to.final longReturn the actual (computed) serialVersionUID for this class.static final longgetActualSerialVersionUID(Class<?> clazz) Return the actual (computed) serialVersionUID for this class.final StringReturn the actual (computed) serialVersionUID for this class.final ObjectStreamFieldGet the field of this class by name.Return an array of the fields of this serializable class.final StringgetName()The name of the class described by this descriptor.final StringThis will return null if there is no writeObject method.final longReturn the serialVersionUID for this class.static final longgetSerialVersionUID(Class<?> clazz) Return the serialVersionUID for this class.final StringReturn the serialVersionUID string for this class.booleanhasField(ValueMember field) final booleaninvokeReadObject(Object obj, ObjectInputStream ois) final booleaninvokeWriteObject(Object obj, ObjectOutputStream ois) readResolve(Object value) final StringtoString()Return a string describing this ObjectStreamClass.writeReplace(Serializable value)
-
Field Details
-
kDefaultUID
public static final long kDefaultUID- See Also:
-
CLASS_MASK
public static final int CLASS_MASK- See Also:
-
FIELD_MASK
public static final int FIELD_MASK- See Also:
-
METHOD_MASK
public static final int METHOD_MASK- See Also:
-
NO_FIELDS
Set serialPersistentFields of a Serializable class to this value to denote that the class has no Serializable fields.
-
-
Method Details
-
getName
The name of the class described by this descriptor. -
getSerialVersionUID
Return the serialVersionUID for this class. The serialVersionUID defines a set of classes all with the same name that have evolved from a common root class and agree to be serialized and deserialized using a common format. -
getSerialVersionUID
public final long getSerialVersionUID()Return the serialVersionUID for this class. The serialVersionUID defines a set of classes all with the same name that have evolved from a common root class and agree to be serialized and deserialized using a common format. -
getSerialVersionUIDStr
Return the serialVersionUID string for this class. The serialVersionUID defines a set of classes all with the same name that have evolved from a common root class and agree to be serialized and deserialized using a common format. -
getActualSerialVersionUID
Return the actual (computed) serialVersionUID for this class. -
getActualSerialVersionUID
public final long getActualSerialVersionUID()Return the actual (computed) serialVersionUID for this class. -
getActualSerialVersionUIDStr
Return the actual (computed) serialVersionUID for this class. -
forClass
Return the class in the local VM that this version is mapped to. Null is returned if there is no corresponding local class. -
getFields
Return an array of the fields of this serializable class.- Returns:
- an array containing an element for each persistent field of this class. Returns an array of length zero if there are no fields.
- Since:
- JDK1.2
-
hasField
-
getField
Get the field of this class by name.- Returns:
- The ObjectStreamField object of the named field or null if there is no such named field.
-
invokeWriteObject
public final boolean invokeWriteObject(Object obj, ObjectOutputStream ois) throws InvocationTargetException - Throws:
InvocationTargetException
-
invokeReadObject
public final boolean invokeReadObject(Object obj, ObjectInputStream ois) throws InvocationTargetException - Throws:
InvocationTargetException
-
writeReplace
-
readResolve
-
toString
Return a string describing this ObjectStreamClass. -
getRMIIIOPOptionalDataRepId
This will return null if there is no writeObject method.
-