JaxbUtil

Helper methods for converting javax.xml.bind.annotation.XmlRootElement -annotated class to-and-from XML.

For example usage, seeIsis addons' publishmq module(non-ASF)

API

JaxbUtil.java
class JaxbUtil {
  Result<T> fromXml(Reader reader, Class<T> dtoClass)
  Result<T> fromXml(Class<?> contextClass, String resourceName, Class<T> dtoClass)
  Result<String> toXml(Object dto)
  void toXml(T dto, Writer writer)
  JAXBContext jaxbContextFor(Class<?> dtoClass)
}