Class XMLSerializer
- java.lang.Object
-
- org.eclipse.persistence.sessions.serializers.AbstractSerializer
-
- org.eclipse.persistence.sessions.serializers.XMLSerializer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Serializer
- Direct Known Subclasses:
JSONSerializer
public class XMLSerializer extends AbstractSerializer
Uses JAXB to convert an object to XML.- See Also:
- Serialized Form
- Author:
- James Sutherland
-
-
Constructor Summary
Constructors Constructor Description XMLSerializer()
XMLSerializer(java.lang.String packageName)
XMLSerializer(JAXBContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
deserialize(java.lang.Object xml, Session session)
java.lang.Class
getType()
void
initialize(java.lang.Class serializeClass, java.lang.String serializePackage, Session session)
java.lang.Object
serialize(java.lang.Object object, Session session)
java.lang.String
toString()
-
-
-
Constructor Detail
-
XMLSerializer
public XMLSerializer()
-
XMLSerializer
public XMLSerializer(java.lang.String packageName)
-
XMLSerializer
public XMLSerializer(JAXBContext context)
-
-
Method Detail
-
initialize
public void initialize(java.lang.Class serializeClass, java.lang.String serializePackage, Session session)
- Specified by:
initialize
in interfaceSerializer
- Overrides:
initialize
in classAbstractSerializer
-
serialize
public java.lang.Object serialize(java.lang.Object object, Session session)
-
deserialize
public java.lang.Object deserialize(java.lang.Object xml, Session session)
-
getType
public java.lang.Class getType()
- Specified by:
getType
in interfaceSerializer
- Overrides:
getType
in classAbstractSerializer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractSerializer
-
-