Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » io » [javadoc | source]
java.io
public class: ObjectStreamClass [javadoc | source]
java.lang.Object
   java.io.ObjectStreamClass

All Implemented Interfaces:
    Serializable

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.
Nested Class Summary:
static class  ObjectStreamClass.OSCThreadLocalCache   
Field Summary
static final  long CONSTRUCTOR_IS_NOT_RESOLVED     
static final  Class<?>[] EMPTY_CONSTRUCTOR_PARAM_TYPES     
static final  Class<?>[] UNSHARED_PARAM_TYPES     
public static final  ObjectStreamField[] NO_FIELDS    Constant indicating that the class has no Serializable fields. 
static final  Class<?> ARRAY_OF_FIELDS     
static final  Class<String> STRINGCLASS     
static final  Class<?> CLASSCLASS     
static final  Class<ObjectStreamClass> OBJECTSTREAMCLASSCLASS     
Constructor:
 ObjectStreamClass() 
Method from java.io.ObjectStreamClass Summary:
buildFieldDescriptors,   fieldSerialPersistentFields,   fields,   findMethod,   findPrivateMethod,   forClass,   getConstructor,   getConstructorSignature,   getField,   getFields,   getFlags,   getLoadFields,   getMethodReadObject,   getMethodReadObjectNoData,   getMethodReadResolve,   getMethodSignature,   getMethodWriteObject,   getMethodWriteReplace,   getName,   getSerialVersionUID,   getSuperclass,   hasMethodReadObject,   hasMethodReadObjectNoData,   hasMethodReadResolve,   hasMethodWriteObject,   hasMethodWriteReplace,   initPrivateFields,   isEnum,   isExternalizable,   isExternalizable,   isPrimitiveType,   isProxy,   isSerializable,   isSerializable,   lookup,   lookupAny,   lookupStreamClass,   setClass,   setConstructor,   setFields,   setFlags,   setLoadFields,   setName,   setSerialVersionUID,   setSuperclass,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.io.ObjectStreamClass Detail:
  void buildFieldDescriptors(Field[] declaredFields) 
    Builds the collection of field descriptors for the receiver
 static Field fieldSerialPersistentFields(Class<?> cl) 
    Return the java.lang.reflect.Field {@code serialPersistentFields} if class {@code cl} implements it. Return null otherwise.
 ObjectStreamField[] fields() 
    Returns the collection of field descriptors for the fields of the corresponding class
 static Method findMethod(Class<?> cl,
    String methodName) 
    Return the java.lang.reflect.Method if class cl implements methodName . Return null otherwise.
 static Method findPrivateMethod(Class<?> cl,
    String methodName,
    Class<?>[] param) 
    Return the java.lang.reflect.Method if class cl implements private methodName . Return null otherwise.
 public Class<?> forClass() 
    Returns the class (java.lang.Class) for this descriptor.
 long getConstructor() 
 static native String getConstructorSignature(Constructor<?> c)
    Return a String representing the signature for a Constructor {@code c}.
 public ObjectStreamField getField(String name) 
    Gets a field descriptor of the class represented by this class descriptor.
 public ObjectStreamField[] getFields() 
    Returns a collection of field descriptors for the serialized fields of the class represented by this class descriptor.
 byte getFlags() 
    Returns the flags for this descriptor, where possible combined values are ObjectStreamConstants.SC_WRITE_METHOD ObjectStreamConstants.SC_SERIALIZABLE ObjectStreamConstants.SC_EXTERNALIZABLE
 ObjectStreamField[] getLoadFields() 
    Returns the collection of field descriptors for the input fields of the corresponding class
 Method getMethodReadObject() 
 Method getMethodReadObjectNoData() 
 Method getMethodReadResolve() 
 static native String getMethodSignature(Method m)
    Return a String representing the signature for a method {@code m}.
 Method getMethodWriteObject() 
 Method getMethodWriteReplace() 
 public String getName() 
    Returns the name of the class represented by this descriptor.
 public long getSerialVersionUID() 
    Returns the Serial Version User ID of the class represented by this descriptor.
 ObjectStreamClass getSuperclass() 
    Returns the descriptor (ObjectStreamClass) of the superclass of the class represented by the receiver.
 boolean hasMethodReadObject() 
 boolean hasMethodReadObjectNoData() 
 boolean hasMethodReadResolve() 
 boolean hasMethodWriteObject() 
 boolean hasMethodWriteReplace() 
  void initPrivateFields(ObjectStreamClass desc) 
 boolean isEnum() 
    Answers whether the class for this descriptor is subclass of Enum
 boolean isExternalizable() 
    Answers whether the class for this descriptor is serializable
 static boolean isExternalizable(Class<?> cl) 
    Return true if instances of class {@code cl} are Externalizable, false otherwise.
 static boolean isPrimitiveType(char typecode) 
    Return true if the type code typecode describes a primitive type
 boolean isProxy() 
    Answers whether the class for this descriptor is proxied class
 boolean isSerializable() 
    Answers whether the class for this descriptor is serializable
 static boolean isSerializable(Class<?> cl) 
    Return true if instances of class {@code cl} are Serializable, false otherwise.
 public static ObjectStreamClass lookup(Class<?> cl) 
    Returns the descriptor corresponding to the class {@code cl}. If the class is not serializable or externalizable then {@code null} is returned.
 public static ObjectStreamClass lookupAny(Class<?> cl) 
    Return the descriptor (ObjectStreamClass) corresponding to the class cl. This method does not check whether the class implements Serializable or Externalizable.
 static ObjectStreamClass lookupStreamClass(Class<?> cl) 
    Return the descriptor (ObjectStreamClass) corresponding to the class {@code cl}. Returns an ObjectStreamClass even if instances of the class cannot be serialized
  void setClass(Class<?> c) 
    Set the class (java.lang.Class) that the receiver represents
  void setConstructor(long newConstructor) 
  void setFields(ObjectStreamField[] f) 
    Set the collection of field descriptors for the fields of the corresponding class
  void setFlags(byte b) 
    Set the flags for this descriptor, where possible combined values are ObjectStreamConstants.SC_WRITE_METHOD ObjectStreamConstants.SC_SERIALIZABLE ObjectStreamConstants.SC_EXTERNALIZABLE
  void setLoadFields(ObjectStreamField[] f) 
    Set the collection of field descriptors for the input fields of the corresponding class
  void setName(String newName) 
    Set the name of the class represented by the receiver
  void setSerialVersionUID(long l) 
    Set the Serial Version User ID of the class represented by the receiver
  void setSuperclass(ObjectStreamClass c) 
    Set the descriptor for the superclass of the class described by the receiver
 public String toString() 
    Returns a string containing a concise, human-readable description of this descriptor.