org.aludratest.hpalm.infrastructure
Class EntityMarshallingUtils
java.lang.Object
org.aludratest.hpalm.infrastructure.EntityMarshallingUtils
public class EntityMarshallingUtils
- extends Object
A utility class for converting between jaxb annotated objects and xml.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
marshal
public static <T> T marshal(Class<T> c,
String xml)
throws JAXBException
- Type Parameters:
T - the type we want to convert our xml into- Parameters:
c - the class of the parameterized typexml - the instance xml description
- Returns:
- a deserialization of the xml into an object of type T of class Class
- Throws:
JAXBException
unmarshal
public static <T> String unmarshal(Class<T> c,
Object o)
throws JAXBException
- Type Parameters:
T - the type to serialize- Parameters:
c - the class of the type to serializeo - the instance containing the data to serialize
- Returns:
- a string representation of the data.
- Throws:
JAXBException
Copyright © 2015 aludratest.org. All rights reserved.