| |
|
| java.lang.Object java.io.ObjectStreamClass
ObjectStreamClass | public class ObjectStreamClass implements Serializable(Code) | | 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
See Also: ObjectOutputStream See Also: ObjectInputStream See Also: java.lang.Class |
ARRAY_OF_FIELDS | final static Class> ARRAY_OF_FIELDS(Code) | | |
EMPTY_CONSTRUCTOR_PARAM_TYPES | final static Class>[] EMPTY_CONSTRUCTOR_PARAM_TYPES(Code) | | |
NO_FIELDS | final public static ObjectStreamField[] NO_FIELDS(Code) | | A value that indicates the class has no Serializable fields
|
UNSHARED_PARAM_TYPES | final static Class>[] UNSHARED_PARAM_TYPES(Code) | | |
ObjectStreamClass | ObjectStreamClass()(Code) | | Constructs a new instance of this class.
|
buildFieldDescriptors | void buildFieldDescriptors(Field[] declaredFields)(Code) | | Builds the collection of field descriptors for the receiver
Parameters: declaredFields - collection of java.lang.reflect.Field for which to computefield descriptors |
fieldSerialPersistentFields | static Field fieldSerialPersistentFields(Class> cl)(Code) | | Return the java.lang.reflect.Field serialPersistentFields
if class cl implements it. Return null otherwise.
Parameters: cl - a java.lang.Class which to test java.lang.reflect.Field if the class hasserialPersistentFields null if the class does nothave serialPersistentFields |
fields | ObjectStreamField[] fields()(Code) | | Answers the collection of field descriptors for the fields of the
corresponding class
the receiver's collection of declared fields for the class itrepresents |
findMethod | static Method findMethod(Class> cl, String methodName)(Code) | | Return the java.lang.reflect.Method if class cl implements
methodName . Return null otherwise.
Parameters: cl - a java.lang.Class which to test java.lang.reflect.Method if the class implementswriteReplace null if the class does not implementwriteReplace |
findPrivateMethod | static Method findPrivateMethod(Class> cl, String methodName, Class>[] param)(Code) | | Return the java.lang.reflect.Method if class cl implements
private methodName . Return null otherwise.
Parameters: cl - a java.lang.Class which to test java.lang.reflect.Method if the class implementswriteReplace null if the class does not implementwriteReplace |
forClass | public Class> forClass()(Code) | | Return the class (java.lang.Class) that the receiver represents
null if there is no corresponding class for thereceiver Class The loaded class corresponding tothe receiver |
getConstructorSignature | native static String getConstructorSignature(Constructor> c)(Code) | | Return a String representing the signature for a Constructor
c .
Parameters: c - a java.lang.reflect.Constructor for which to compute thesignature the constructor's signature |
getField | public ObjectStreamField getField(String name)(Code) | | Answers a given field by name.
Parameters: name - name of the desired field. a given field by name. |
getFields | public ObjectStreamField[] getFields()(Code) | | Answers the collection of field descriptors for the fields of the
corresponding class
the receiver's collection of declared fields for the class itrepresents |
getFlags | byte getFlags()(Code) | | Answers the flags for this descriptor, where possible combined values are
ObjectStreamConstants.SC_WRITE_METHOD
ObjectStreamConstants.SC_SERIALIZABLE
ObjectStreamConstants.SC_EXTERNALIZABLE
byte the receiver's flags for the class it represents |
getLoadFields | ObjectStreamField[] getLoadFields()(Code) | | Answers the collection of field descriptors for the input fields of the
corresponding class
the receiver's collection of input fields for the class itrepresents |
getMethodReadObjectNoData | Method getMethodReadObjectNoData()(Code) | | |
getMethodSignature | native static String getMethodSignature(Method m)(Code) | | Return a String representing the signature for a method m .
Parameters: m - a java.lang.reflect.Method for which to compute the signature the method's signature |
getName | public String getName()(Code) | | Answers the name of the class represented by the receiver
fully qualified name of the class the receiver represents |
getSerialVersionUID | public long getSerialVersionUID()(Code) | | Answers the Serial Version User ID of the class represented by the
receiver
SUID for the class represented by the receiver |
getSuperclass | ObjectStreamClass getSuperclass()(Code) | | Answers the descriptor (ObjectStreamClass) of the superclass of the class
represented by the receiver.
an ObjectStreamClass representing the superclass of the classrepresented by the receiver. |
hasMethodReadObject | boolean hasMethodReadObject()(Code) | | |
hasMethodReadObjectNoData | boolean hasMethodReadObjectNoData()(Code) | | |
hasMethodReadResolve | boolean hasMethodReadResolve()(Code) | | |
hasMethodWriteObject | boolean hasMethodWriteObject()(Code) | | |
hasMethodWriteReplace | boolean hasMethodWriteReplace()(Code) | | |
isExternalizable | static boolean isExternalizable(Class> cl)(Code) | | Return true if instances of class cl are Externalizable,
false otherwise.
Parameters: cl - a java.lang.Class which to test true if instances of the class are Externalizablefalse if instances of the class are notExternalizable See Also: Object.hashCode |
isPrimitiveType | static boolean isPrimitiveType(char typecode)(Code) | | Return true if the type code
typecode describes a primitive type
Parameters: typecode - a char describing the typecode true if the typecode represents a primitive type false if the typecode represents an Object type (including arrays) See Also: Object.hashCode |
isSerializable | static boolean isSerializable(Class> cl)(Code) | | Return true if instances of class cl are Serializable,
false otherwise.
Parameters: cl - a java.lang.Class which to test true if instances of the class are Serializablefalse if instances of the class are notSerializable See Also: Object.hashCode |
lookup | public static ObjectStreamClass lookup(Class> cl)(Code) | | 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 correspondingdescriptor null if instances of the class cl are not Serializable or ExternalizableObjectStreamClass The corresponding descriptor ifthe class cl is Serializable or Externalizable |
lookupStreamClass | static ObjectStreamClass lookupStreamClass(Class> cl)(Code) | | Return the descriptor (ObjectStreamClass) corresponding to the class
cl . Returns an ObjectStreamClass even if instances of the
class cannot be serialized
Parameters: cl - a java.langClass for which to obtain the correspondingdescriptor the corresponding descriptor |
setClass | void setClass(Class> c)(Code) | | Set the class (java.lang.Class) that the receiver represents
Parameters: c - aClass, the new class that the receiver describes |
setFields | void setFields(ObjectStreamField[] f)(Code) | | Set the collection of field descriptors for the fields of the
corresponding class
Parameters: f - ObjectStreamField[], the receiver's new collection of declaredfields for the class it represents |
setFlags | void setFlags(byte b)(Code) | | Set the flags for this descriptor, where possible combined values are
ObjectStreamConstants.SC_WRITE_METHOD
ObjectStreamConstants.SC_SERIALIZABLE
ObjectStreamConstants.SC_EXTERNALIZABLE
Parameters: b - byte, the receiver's new flags for the class it represents |
setLoadFields | void setLoadFields(ObjectStreamField[] f)(Code) | | Set the collection of field descriptors for the input fields of the
corresponding class
Parameters: f - ObjectStreamField[], the receiver's new collection of inputfields for the class it represents |
setName | void setName(String newName)(Code) | | Set the name of the class represented by the receiver
Parameters: newName - a String, the new fully qualified name of the class thereceiver represents |
setSerialVersionUID | void setSerialVersionUID(long l)(Code) | | Set the Serial Version User ID of the class represented by the receiver
Parameters: l - a long, the new SUID for the class represented by the receiver |
setSuperclass | void setSuperclass(ObjectStreamClass c)(Code) | | Set the descriptor for the superclass of the class described by the
receiver
Parameters: c - an ObjectStreamClass, the new ObjectStreamClass for thesuperclass of the class represented by the receiver |
toString | public String toString()(Code) | | Answers a string containing a concise, human-readable description of the
receiver.
a printable representation for the receiver. |
|
|
|