Package jadex.xml
Class PropertiesXMLHelper
- java.lang.Object
-
- jadex.xml.PropertiesXMLHelper
-
public class PropertiesXMLHelper extends java.lang.Object
A simple static helper class for reading and writing jadex.commons.Properties.
-
-
Field Summary
Fields Modifier and Type Field Description protected static TypeInfoPathManager
pathmanager
The path manager.protected static IObjectReaderHandler
readerhandler
The reader handler.static java.util.Set
typeinfos
The type infos.protected static IObjectWriterHandler
writerhandler
The writer handler.
-
Constructor Summary
Constructors Constructor Description PropertiesXMLHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IObjectReaderHandler
getObjectReaderHandler()
Get the default Java reader.static IObjectWriterHandler
getObjectWriterHandler()
Get the default Java writer.static TypeInfoPathManager
getPathManager()
Get the default Java reader.static <T> T
read(java.io.InputStream is, java.lang.ClassLoader classloader)
Convert an xml to an object.static <T> T
read(java.lang.String val, java.lang.ClassLoader classloader)
Convert an xml to an object.static void
write(java.lang.Object val, java.io.OutputStream os, java.lang.ClassLoader classloader)
Convert to a string.static java.lang.String
write(java.lang.Object val, java.lang.ClassLoader classloader)
Convert to a string.
-
-
-
Field Detail
-
typeinfos
public static final java.util.Set typeinfos
The type infos.
-
pathmanager
protected static volatile TypeInfoPathManager pathmanager
The path manager.
-
readerhandler
protected static volatile IObjectReaderHandler readerhandler
The reader handler.
-
writerhandler
protected static volatile IObjectWriterHandler writerhandler
The writer handler.
-
-
Method Detail
-
write
public static java.lang.String write(java.lang.Object val, java.lang.ClassLoader classloader)
Convert to a string.
-
write
public static void write(java.lang.Object val, java.io.OutputStream os, java.lang.ClassLoader classloader)
Convert to a string.
-
read
public static <T> T read(java.lang.String val, java.lang.ClassLoader classloader)
Convert an xml to an object.- Parameters:
val
- The string value.- Returns:
- The decoded object.
-
read
public static <T> T read(java.io.InputStream is, java.lang.ClassLoader classloader)
Convert an xml to an object.- Parameters:
val
- The string value.- Returns:
- The decoded object.
-
getPathManager
public static TypeInfoPathManager getPathManager()
Get the default Java reader.- Returns:
- The Java reader.
-
getObjectReaderHandler
public static IObjectReaderHandler getObjectReaderHandler()
Get the default Java reader.- Returns:
- The Java reader.
-
getObjectWriterHandler
public static IObjectWriterHandler getObjectWriterHandler()
Get the default Java writer.- Returns:
- The Java writer.
-
-