java.io.ObjectStreamClass
Instances of ObjectStreamClass are used to describe classes of objects used
by serialization. When objects are saved, information about all its
superclasses is also saved by the use of descriptors, instances of
ObjectStreamClass.
These descriptors carry information about the class they represent, such as -
The name of the class - SUID of the class - Field names and types
Summary
Constants
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
A value that indicates the class has no Serializable fields
Public Methods
public
Class<?>
forClass()
Return the class (java.lang.Class) that the receiver represents
Returns
null
if there is no corresponding class for the
receiver Class
The loaded class corresponding to
the receiver
Returns a given field by name.
Parameters
name
| name of the desired field. |
Returns the collection of field descriptors for the fields of the
corresponding class
Returns
- the receiver's collection of declared fields for the class it
represents
public
String
getName()
Returns the name of the class represented by the receiver
Returns
- fully qualified name of the class the receiver represents
public
long
getSerialVersionUID()
Returns the Serial Version User ID of the class represented by the
receiver
Returns
- SUID for the class represented by the receiver
Return the descriptor (ObjectStreamClass) corresponding to the class
cl
. If the class is not Serializable or Externalizable,
null is returned.
Parameters
cl
| a java.langClass for which to obtain the corresponding
descriptor |
Returns
null
if instances of the class cl
are not Serializable or Externalizable
ObjectStreamClass
The corresponding descriptor if
the class cl
is Serializable or Externalizable
public
String
toString()
Returns a string containing a concise, human-readable description of the
receiver.
Returns
- a printable representation for the receiver.