Package io.github.astrapi69.xstream
Class ObjectToXmlExtensions
- java.lang.Object
-
- io.github.astrapi69.xstream.ObjectToXmlExtensions
-
public class ObjectToXmlExtensions extends java.lang.ObjectThe classObjectToXmlExtensionsprovides methods for convert java objects to xml string objects
-
-
Constructor Summary
Constructors Constructor Description ObjectToXmlExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.StringtoXml(com.thoughtworks.xstream.XStream xstream, T objectToXML)Creates from the given Object an xml string.static <T> java.lang.StringtoXml(com.thoughtworks.xstream.XStream xstream, T objectToXML, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given Object an xml string.static <T> java.lang.StringtoXml(T objectToXML)Creates from the given Object an xml string.static <T> java.lang.StringtoXml(T objectToXML, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given Object an xml string.
-
-
-
Method Detail
-
toXml
public static <T> java.lang.String toXml(T objectToXML)
Creates from the given Object an xml string.- Type Parameters:
T- the generic type of the return type- Parameters:
objectToXML- the object to xml- Returns:
- the xml string
-
toXml
public static <T> java.lang.String toXml(com.thoughtworks.xstream.XStream xstream, T objectToXML)Creates from the given Object an xml string.- Type Parameters:
T- the generic type of the object that will be transformed to xml- Parameters:
xstream- the xstream object.objectToXML- the object to xml- Returns:
- the xml string
-
toXml
public static <T> java.lang.String toXml(com.thoughtworks.xstream.XStream xstream, T objectToXML, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given Object an xml string. The given map hold the aliases. For more information with aliasing see documation of xstream.- Type Parameters:
T- the generic type of the return type- Parameters:
xstream- the xstreamobjectToXML- the object to xmlaliases- the aliases- Returns:
- the xml string
-
toXml
public static <T> java.lang.String toXml(T objectToXML, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given Object an xml string. The given map hold the aliases. For more information with aliasing see documation of xstream.- Type Parameters:
T- the generic type of the object that will be transformed to xml- Parameters:
objectToXML- the object to xmlaliases- the aliases- Returns:
- the xml string
-
-