Class Overview
Represents a descriptor for identifying a class during serialization and
deserialization. Information contained in the descriptor includes the name
and SUID of the class as well as field names and types. Information inherited
from the superclasses is also taken into account.
Summary
Public Methods |
Class<?>
|
forClass()
Returns the class (java.lang.Class) for this descriptor.
|
ObjectStreamField
|
getField(String name)
Gets a field descriptor of the class represented by this class
descriptor.
|
ObjectStreamField[]
|
getFields()
Returns a collection of field descriptors for the serialized fields of
the class represented by this class descriptor.
|
String
|
getName()
Returns the name of the class represented by this descriptor.
|
long
|
getSerialVersionUID()
Returns the Serial Version User ID of the class represented by this
descriptor.
|
static
ObjectStreamClass
|
lookup(Class<?> cl)
Returns the descriptor corresponding to the class cl .
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
descriptor.
|
[Expand]
Inherited Methods |
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
Constants
Constant indicating that the class has no Serializable fields.
Public Methods
public
Class<?>
forClass
()
Returns the class (java.lang.Class) for this descriptor.
Returns
- the class in the local VM that this descriptor represents;
null
if there is no corresponding class.
Gets a field descriptor of the class represented by this class
descriptor.
Parameters
name
| the name of the desired field. |
Returns
- the field identified by
name
or null
if there is
no such field.
Returns a collection of field descriptors for the serialized fields of
the class represented by this class descriptor.
Returns
- an array of field descriptors or an array of length zero if there
are no fields in this descriptor's class.
public
String
getName
()
Returns the name of the class represented by this descriptor.
Returns
- the fully qualified name of the class this descriptor represents.
public
long
getSerialVersionUID
()
Returns the Serial Version User ID of the class represented by this
descriptor.
Returns
- the SUID for the class represented by this descriptor.
Returns the descriptor corresponding to the class cl
. If the
class is not serializable or externalizable then null
is
returned.
Parameters
cl
| a java.langClass for which to obtain the corresponding
descriptor |
Returns
- the corresponding descriptor if the
cl
is serializable or
externalizable; null
otherwise.
public
String
toString
()
Returns a string containing a concise, human-readable description of this
descriptor.
Returns
- a printable representation of this descriptor.