public final class XmlToObjectExtensions
extends java.lang.Object
XmlToObjectExtensions.| Modifier and Type | Method and Description |
|---|---|
static <T> T |
toObjectWithJackson(java.lang.String xmlString,
java.lang.Class<T> clazz)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithJackson(java.lang.String xmlString,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithJackson(java.lang.String xmlString,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference,
com.fasterxml.jackson.databind.ObjectMapper xmlMapper)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXMLDecoder(java.lang.String xmlString)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXStream(java.lang.String xmlString)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXStream(java.lang.String xmlString,
java.util.Map<java.lang.String,java.lang.Class<?>> aliases)
Creates from the given xml string an Object.
|
static <T> T |
toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
java.lang.String xmlString)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
java.lang.String xmlString,
java.util.Map<java.lang.String,java.lang.Class<?>> aliases)
Creates from the given xml string an java object.
|
public static <T> T toObjectWithJackson(java.lang.String xmlString,
java.lang.Class<T> clazz)
throws com.fasterxml.jackson.core.JsonProcessingException
T - the generic type of the return typexmlString - the xmlclazz - the class of the generic typecom.fasterxml.jackson.core.JsonProcessingException - is thrown when processing json content that are not pure I/O problemspublic static <T> T toObjectWithJackson(java.lang.String xmlString,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
throws com.fasterxml.jackson.core.JsonProcessingException
T - the generic type of the return typexmlString - the xmltypeReference - the type referencecom.fasterxml.jackson.core.JsonProcessingException - is thrown when processing json content that are not pure I/O problemspublic static <T> T toObjectWithJackson(java.lang.String xmlString,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference,
com.fasterxml.jackson.databind.ObjectMapper xmlMapper)
throws com.fasterxml.jackson.core.JsonProcessingException
T - the generic type of the return typexmlString - the xmltypeReference - the type referencexmlMapper - the xml mappercom.fasterxml.jackson.core.JsonProcessingException - is thrown when processing json content that are not pure I/O problemspublic static <T> T toObjectWithXMLDecoder(java.lang.String xmlString)
T - the generic typexmlString - the xml string to transform to an java object.public static <T> T toObjectWithXStream(java.lang.String xmlString)
T - the generic type of the return typexmlString - the xml as string objectpublic static <T> T toObjectWithXStream(java.lang.String xmlString,
java.util.Map<java.lang.String,java.lang.Class<?>> aliases)
T - the generic type of the return typexmlString - the xml as string objectaliases - the aliasespublic static <T> T toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
java.lang.String xmlString)
T - the generic type of the return typexstream - the xstream object.xmlString - the xml as string objectpublic static <T> T toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
java.lang.String xmlString,
java.util.Map<java.lang.String,java.lang.Class<?>> aliases)
T - the generic type of the return typexstream - the xstream object.xmlString - the xmlaliases - the aliases