public class ObjectStreamClass extends Objectimplements Serializable
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 Form
| Modifier 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
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
Find the descriptor for a class that can be serialized.
|
static ObjectStreamClass |
lookupAny(Class
Returns the descriptor for any class, regardless of whether it implements
Serializable.
|
String |
toString()
Return a string describing this ObjectStreamClass.
|
public static final ObjectStreamField[] NO_FIELDS
public static ObjectStreamClasslookup(Class <?> cl)
cl - class for which to get the descriptor
public static ObjectStreamClasslookupAny(Class <?> cl)
Serializable.
cl - class for which to get the descriptor
public StringgetName()
Class.getName() method.
public long getSerialVersionUID()
public Class<?> forClass()
Class instance that this descriptor represents
public ObjectStreamField[] getFields()
public ObjectStreamFieldgetField(String name)
name - the name of the data field to look for