Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.ObjectStreamClass
public class ObjectStreamClass extends Object implements Serializable
Serialization's descriptor for classes. It contains the name and serialVersionUID of the class. The ObjectStreamClass for a specific class loaded in this Java VM can be found/created using the lookup method.
The algorithm to compute the SerialVersionUID is described in Object Serialization Specification, Section 4.6, Stream Unique Identifiers.
ObjectStreamField
,
Object Serialization Specification, Section 4, Class Descriptors,
Serialized FormModifier and Type | Field and Description |
---|---|
static ObjectStreamField[] |
NO_FIELDS
serialPersistentFields value indicating no serializable fields |
Modifier and Type | Method and Description |
---|---|
Class<?> |
forClass()
Return the class in the local VM that this version is mapped to. |
ObjectStreamField |
getField(String name)
Get the field of this class by name. |
ObjectStreamField[] |
getFields()
Return an array of the fields of this serializable class. |
String |
getName()
Returns the name of the class described by this descriptor. |
long |
getSerialVersionUID()
Return the serialVersionUID for this class. |
static ObjectStreamClass |
lookup(Class<?> cl)
Find the descriptor for a class that can be serialized. |
static ObjectStreamClass |
lookupAny(Class<?> cl)
Returns the descriptor for any class, regardless of whether it implements Serializable . |
String |
toString()
Return a string describing this ObjectStreamClass. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ObjectStreamField[] NO_FIELDS
Method Detail |
---|
public static ObjectStreamClass lookup(Class<?> cl)
cl
- class for which to get the descriptorpublic static ObjectStreamClass lookupAny(Class<?> cl)
Serializable
.
cl
- class for which to get the descriptorpublic String getName()
Class.getName()
method.
public long getSerialVersionUID()
public Class<?> forClass()
Class
instance that this descriptor representspublic ObjectStreamField[] getFields()
public ObjectStreamField getField(String name)
name
- the name of the data field to look forpublic String toString()
toString
in class Object
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.