org.openejb.util.io
Class ClassDescriptor
java.lang.Object
org.openejb.util.io.ClassDescriptor
- All Implemented Interfaces:
- java.io.ObjectStreamConstants, java.io.Serializable
public class ClassDescriptor
- extends java.lang.Object
- implements java.io.Serializable, java.io.ObjectStreamConstants
- See Also:
- Serialized Form
Fields inherited from interface java.io.ObjectStreamConstants |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
flags
protected int flags
NO_FIELDS
public static final FieldDescriptor[] NO_FIELDS
fields
protected FieldDescriptor[] fields
ClassDescriptor
protected ClassDescriptor(java.lang.Class clazz,
ClassDescriptor superdesc,
boolean serializable,
boolean externalizable)
writeClassInfo
protected void writeClassInfo(ObjectOutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
isSerializable
protected boolean isSerializable()
isExternalizable
protected boolean isExternalizable()
isNonSerializable
protected boolean isNonSerializable()
getFields
public FieldDescriptor[] getFields()
setFields
public void setFields(FieldDescriptor[] fields)
hasWriteObjectMethod
public boolean hasWriteObjectMethod()
hasWriteObjectMethod
public void hasWriteObjectMethod(boolean b)
getWriteObjectMethod
public java.lang.reflect.Method getWriteObjectMethod()
setWriteObjectMethod
protected void setWriteObjectMethod(java.lang.reflect.Method method)
hasReadObjectMethod
public boolean hasReadObjectMethod()
hasReadObjectMethod
public void hasReadObjectMethod(boolean b)
getReadObjectMethod
public java.lang.reflect.Method getReadObjectMethod()
setReadObjectMethod
protected void setReadObjectMethod(java.lang.reflect.Method method)
getSerialVersionUID
public long getSerialVersionUID()
- Return the serialVersionUID for this class.
NonSerializable classes have a serialVersionUID of 0L.
setSerialVersionUID
protected void setSerialVersionUID(long suid)
getName
public java.lang.String getName()
- The name of the class described by this descriptor.
forClass
public java.lang.Class forClass()
- Return the class in the local VM that this version is mapped to.
Null is returned if there is no corresponding local class.
getSuperclass
protected ClassDescriptor getSuperclass()
setSuperclass
protected void setSuperclass(ClassDescriptor s)
toString
public java.lang.String toString()
- Return a string describing this ClassDescriptor.
- Overrides:
toString
in class java.lang.Object
getSignature
public static java.lang.StringBuffer getSignature(java.lang.Class clazz)
getSignature
public static java.lang.StringBuffer getSignature(java.lang.Class clazz,
java.lang.StringBuffer buf)
lookup
public static ClassDescriptor lookup(java.lang.Class clazz)
- Find the descriptor for a class that can be serialized.
Creates an ObjectStreamClass instance if one does not exist
yet for class. Null is returned if the specified class does not
implement java.io.Serializable or java.io.Externalizable.
Copyright © 1999-2011 OpenEJB. All Rights Reserved.