public class SerializationHelper extends Object
Modifier and Type | Method and Description |
---|---|
static <S> Method |
getCreateMethod(Class<S> clz)
Fetches factory method to create the corresponding JAXBElement
|
static <S> String |
marshall(Class<S> clz,
S obj)
Marshalls object to XML
|
static <S> S |
unmarshall(Class<S> clz,
String xml)
Unmarshall object from the XML string
|
public static <S> String marshall(Class<S> clz, S obj)
clz
- Actual object classobj
- Resource to marshallpublic static <S> Method getCreateMethod(Class<S> clz)
clz
- class to create the JAXBElement fromCopyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0