|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.metasyntactic.io.ClassDescriptor
XMLSerializer's descriptor for classes. It contains the name and serialVersionUID of the class. The ClassDescriptor for a specific class loaded in this Java VM can be found/created using the lookup method.
Comments for fields and methods will often refer to 'clazz'. 'clazz' is the class that the current ClassDescriptor is a descriptor for.
| Field Summary | |
protected static java.util.Map |
classToDescriptor
Cache of classes to their descriptors. |
protected java.lang.Class |
clazz
Class that this is a descriptor for |
protected java.lang.reflect.Field[] |
fields
Cached non-static and non-transient fields of clazz. |
protected boolean |
includeEverything
|
protected java.lang.reflect.Method |
readResolveMethod
Cached pointer to clazz's readResolve method (if clazz has such a method). |
protected boolean |
serializable
True if and only if clazz is serializable, or inherits from a serializable class |
protected long |
suid
Cached serial version UID for clazz |
protected ClassDescriptor |
superclassDescriptor
Class descriptor for clazz's superclass |
protected java.lang.reflect.Method |
writeReplaceMethod
Cached pointer to clazz's writeReplace method (if clazz has such a method). |
| Constructor Summary | |
protected |
ClassDescriptor(java.lang.Class clazz,
ClassDescriptor superclassDescriptor,
boolean serializable,
boolean includeEverything)
Creates a new Class Descriptor with all (non-cached) fields filled in. |
| Method Summary | |
java.lang.Class |
forClass()
Returns the class that this is a descriptor for |
java.lang.String |
getClassName()
Returns clazz's class name |
java.lang.reflect.Field[] |
getFields()
Returns all the non-static non-transient fields of clazz. |
long |
getSerialVersionUID()
Returns clazz's serial version UID |
ClassDescriptor |
getSuperclassDescriptor()
Returns the class descriptor for clazz's superclass. |
protected void |
init()
Initializes thi class descriptor. |
static ClassDescriptor |
lookup(java.lang.Class cl)
Returns a ClassDescriptor for cl if cl is serializable, otherwise null. |
static ClassDescriptor |
lookup(java.lang.Class cl,
boolean includeEverything)
|
protected static ClassDescriptor |
lookupInternal(java.lang.Class cl,
boolean includeEverything)
Finds the actual class descriptor for cl. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static java.util.Map classToDescriptor
protected java.lang.Class clazz
protected java.lang.reflect.Field[] fields
protected ClassDescriptor superclassDescriptor
protected boolean serializable
protected long suid
org.metasyntactic.util.StreamUniqueIdentifier#compute(java.lang.Class)protected java.lang.reflect.Method writeReplaceMethod
protected java.lang.reflect.Method readResolveMethod
protected boolean includeEverything
| Constructor Detail |
protected ClassDescriptor(java.lang.Class clazz,
ClassDescriptor superclassDescriptor,
boolean serializable,
boolean includeEverything)
clazz - The class this is a descriptor forsuperclassDescriptor - The descriptor for clazz's superclassserializable - Whether or not clazz is serialiablelookup(java.lang.Class),
#lookupInternal(java.lang.Class)| Method Detail |
public java.lang.String getClassName()
public long getSerialVersionUID()
public ClassDescriptor getSuperclassDescriptor()
public java.lang.Class forClass()
public java.lang.reflect.Field[] getFields()
public static ClassDescriptor lookup(java.lang.Class cl)
cl - The class to get a descriptor for.
public static ClassDescriptor lookup(java.lang.Class cl,
boolean includeEverything)
protected static ClassDescriptor lookupInternal(java.lang.Class cl,
boolean includeEverything)
cl - The class to get the ClassDescriptor for
protected void init()
fields,
suid,
writeReplaceMethod,
readResolveMethod
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||