de.javakaffee.web.msm.serializer.javolution
Class CustomXMLFormat<T>

java.lang.Object
  extended by javolution.xml.XMLFormat<T>
      extended by de.javakaffee.web.msm.serializer.javolution.CustomXMLFormat<T>
Direct Known Subclasses:
CGLibProxyFormat, HibernateCollectionsXMLFormat, JodaDateTimeFormat

public abstract class CustomXMLFormat<T>
extends javolution.xml.XMLFormat<T>

The superclass for custom XMLFormats that are used by the javolution serializer.

Author:
Martin Grotzke

Nested Class Summary
 
Nested classes/interfaces inherited from class javolution.xml.XMLFormat
javolution.xml.XMLFormat.InputElement, javolution.xml.XMLFormat.OutputElement
 
Field Summary
 
Fields inherited from class javolution.xml.XMLFormat
APPENDABLE_XML, BOOLEAN_XML, BYTE_XML, CHARACTER_XML, CLASS_XML, COLLECTION_XML, CONFIGURABLE_XML, DOUBLE_XML, FAST_COLLECTION_XML, FAST_COMPARATOR_XML, FAST_MAP_XML, FLOAT_XML, INDEX_XML, INTEGER_XML, LONG_XML, MAP_XML, OBJECT_ARRAY_XML, OBJECT_XML, PERSISTENT_CONTEXT_XML, QNAME_XML, SHORT_XML, STRING_XML, TEXT_XML
 
Constructor Summary
CustomXMLFormat()
          Creates a new instance, super XMLFormat constructor is invoked with null.
 
Method Summary
abstract  boolean canConvert(Class<?> cls)
          Used to determine if this XMLFormat can handle the given class, both during serialization and deserialization.
 Class<?> getTargetClass(Class<?> cls)
          Used to determine the class that is used for writing the class attribute to the serialized xml.
 
Methods inherited from class javolution.xml.XMLFormat
getBoundClass, getDefault, isReferenceable, newInstance, read, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomXMLFormat

public CustomXMLFormat()
Creates a new instance, super XMLFormat constructor is invoked with null.

Method Detail

canConvert

public abstract boolean canConvert(Class<?> cls)
Used to determine if this XMLFormat can handle the given class, both during serialization and deserialization.

Parameters:
cls - the class to check
Returns:
true if this XMLFormat serializes/deserializes instances of the provided class.

getTargetClass

public Class<?> getTargetClass(Class<?> cls)
Used to determine the class that is used for writing the class attribute to the serialized xml. This is usefull if the given class is a proxy.

This implementation just returns the provided class, subclasses may override this.

Parameters:
cls - the class to check
Returns:
the translated class


Copyright © 2009-2012. All Rights Reserved.