it.unimo.dbgroup.momis.XmlTools
Class BaseObjectDomStreamer

java.lang.Object
  extended byit.unimo.dbgroup.momis.XmlTools.BaseXmlTools
      extended byit.unimo.dbgroup.momis.XmlTools.BaseObjectDomStreamer
Direct Known Subclasses:
XmlReader, XmlWriter

public class BaseObjectDomStreamer
extends BaseXmlTools

Base class for specialized object streamers.

It provides methods to retreive information on classes or object instances usefull for serializing or deserializing pourpose.

Author:
Davide Lenzi dic 2000

Field Summary
 
Fields inherited from class it.unimo.dbgroup.momis.XmlTools.BaseXmlTools
_debug, ATTR_TYPE, attrArrayLength, attrBalanced, attrClassName, attrClassNameAsTagName, attrDescr, attrField, attrFullClassNameAsAttribute, attrFullJavaClassName, attrObjectArchive, attrObjectID, attrObjectREF, attrSUID, attrValue, CDATA_TYPE, COMMENT_TYPE, DOCFRAG_TYPE, DOCTYPE_TYPE, DOCUMENT_TYPE, ELEMENT_TYPE, ENTITY_TYPE, ENTITYREF_TYPE, metaNameSpace, NOTATION_TYPE, PROCINSTR_TYPE, tagArray, tagBoolean, tagByte, tagChar, tagDouble, tagEndDefaultData, tagFloat, tagInt, tagLong, tagMapEntry, tagMeta, tagNull, tagObject, tagShort, tagSUIDEntry, tagSuperclass, TEXT_TYPE
 
Constructor Summary
protected BaseObjectDomStreamer()
          Default constructor.
 
Method Summary
static java.lang.String getClassDetails(java.lang.Class cl)
          Returns a string that describe the class cl.
static long getSerialVersionUID(java.lang.Class cl)
          Returns the serial version unique identifier (suid) for the class cl.
protected static boolean isArray(java.lang.Object obj)
          Returns true if obj is an array object.
protected static boolean isDeserializable(java.lang.Class cl)
          Returns true if class cl is deserializable.
protected static boolean isPrimitiveWrapper(java.lang.Class cl)
          Returns true if cl is the Class object of a primitive type wrapper.
protected static boolean isPrimitiveWrapper(java.lang.Object obj)
          Returns true if obj is a primitive type wrapper.
static boolean isSerializable(java.lang.Class cl)
          Returns true if cl implements the Serializable interface.
 
Methods inherited from class it.unimo.dbgroup.momis.XmlTools.BaseXmlTools
debug, getElementString, throwNodeException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseObjectDomStreamer

protected BaseObjectDomStreamer()
Default constructor.

Method Detail

isSerializable

public static boolean isSerializable(java.lang.Class cl)
Returns true if cl implements the Serializable interface.


isDeserializable

protected static boolean isDeserializable(java.lang.Class cl)
Returns true if class cl is deserializable.

A class cl is deserializable if and only if it implements one of the following interfaces:
- Serializable
- Externalizable
- XmlExternalizable
and the the first non serializable superclass must have a no-args constructor public or protected.

Parameters:
cl - Class object to be examined.

isPrimitiveWrapper

protected static boolean isPrimitiveWrapper(java.lang.Class cl)
Returns true if cl is the Class object of a primitive type wrapper.


isPrimitiveWrapper

protected static boolean isPrimitiveWrapper(java.lang.Object obj)
Returns true if obj is a primitive type wrapper.

Returns:
This method return isPrimitiveWrapper(obj.getClass())

isArray

protected static boolean isArray(java.lang.Object obj)
Returns true if obj is an array object.


getClassDetails

public static java.lang.String getClassDetails(java.lang.Class cl)
Returns a string that describe the class cl.


getSerialVersionUID

public static long getSerialVersionUID(java.lang.Class cl)
                                throws java.io.NotSerializableException
Returns the serial version unique identifier (suid) for the class cl.

Throws:
java.io.NotSerializableException - if class cl does not implement any Serializable, XmExternalizable or Externalizable interface.


Universita' di Modena e Reggio Emilia