org.jclouds.xml.internal
Class JAXBParser
java.lang.Object
org.jclouds.xml.internal.JAXBParser
- All Implemented Interfaces:
- XMLParser
@Singleton
public class JAXBParser
- extends Object
- implements XMLParser
Parses XML documents using JAXB.
- Author:
- Ignasi Barrera
- See Also:
ParseXMLWithJAXB
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXBParser
public JAXBParser()
toXML
public String toXML(Object src)
throws IOException
- Description copied from interface:
XMLParser
- Serialize the object into xml.
- Specified by:
toXML
in interface XMLParser
- Throws:
IOException
toXML
public <T> String toXML(Object src,
Class<T> type)
throws IOException
- Description copied from interface:
XMLParser
- Serialize the object into xml, as the declared type.
- Specified by:
toXML
in interface XMLParser
- Throws:
IOException
fromXML
public <T> T fromXML(String xml,
Class<T> type)
throws IOException
- Description copied from interface:
XMLParser
- Deserialize the object from xml.
- Specified by:
fromXML
in interface XMLParser
- Throws:
IOException
Copyright © 2009-2012 jclouds. All Rights Reserved.