Package io.github.astrapi69.xstream
Class XmlFileToObjectExtensions
- java.lang.Object
-
- io.github.astrapi69.xstream.XmlFileToObjectExtensions
-
public final class XmlFileToObjectExtensions extends java.lang.ObjectThe classXmlFileToObjectExtensionsprovides algorithms for transform a given xml file to a java object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TtoObject(com.thoughtworks.xstream.XStream xstream, java.io.File xmlFile)Creates from the given xml file a java objectstatic <T> TtoObject(com.thoughtworks.xstream.XStream xstream, java.io.File xmlFile, java.lang.String charsetName, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given xml file a java object.static <T> TtoObject(com.thoughtworks.xstream.XStream xstream, java.io.File xmlFile, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given xml file a java object.static <T> TtoObject(java.io.File xmlFile)Creates from the given xml string an java object.static <T> TtoObject(java.io.File xmlFile, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given xml file a java object.
-
-
-
Method Detail
-
toObject
public static <T> T toObject(java.io.File xmlFile)
Creates from the given xml string an java object.- Type Parameters:
T- the generic type of the return type- Parameters:
xmlFile- the xml file- Returns:
- the created object from the given xml file
-
toObject
public static <T> T toObject(java.io.File xmlFile, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given xml file a java object. 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:
xmlFile- the xml filealiases- the aliases- Returns:
- the created object from the given xml file
-
toObject
public static <T> T toObject(com.thoughtworks.xstream.XStream xstream, java.io.File xmlFile)Creates from the given xml file a java object- Type Parameters:
T- the generic type of the return type- Parameters:
xstream- the xstream object.xmlFile- the xml file- Returns:
- the created object from the given xml file
-
toObject
public static <T> T toObject(com.thoughtworks.xstream.XStream xstream, java.io.File xmlFile, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given xml file a java object. The given map hold the aliases. For more information with aliasing see documentation of xstream.- Type Parameters:
T- the generic type of the return type- Parameters:
xstream- the xstream object.xmlFile- the xml filealiases- the aliases- Returns:
- the created object from the given xml file
-
toObject
public static <T> T toObject(com.thoughtworks.xstream.XStream xstream, java.io.File xmlFile, java.lang.String charsetName, java.util.Map<java.lang.String,java.lang.Class<?>> aliases)Creates from the given xml file a java object. The given map hold the aliases. For more information with aliasing see documentation of xstream.- Type Parameters:
T- the generic type of the return type- Parameters:
xstream- the xstream object.xmlFile- the xml filecharsetName- the encoding name of the charset form the given xml filealiases- the aliases- Returns:
- the created object from the given xml file
-
-