Package jadex.xml.bean
Class JavaReader
- java.lang.Object
-
- jadex.xml.bean.JavaReader
-
public class JavaReader extends java.lang.Object
Java specific reader that supports collection classes and arrays.
-
-
Field Summary
Fields Modifier and Type Field Description protected static IObjectReaderHandler
handler
The type manager.protected static TypeInfoPathManager
pathmanager
The path manager.protected static AReader
reader
The reader.
-
Constructor Summary
Constructors Constructor Description JavaReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IObjectReaderHandler
getObjectHandler()
Get the default Java reader.static TypeInfoPathManager
getPathManager()
Get the default Java reader.static java.util.Set<TypeInfo>
getTypeInfos()
Get the java type infos.static java.util.Set<TypeInfo>
joinTypeInfos(java.util.Set<TypeInfo> typeinfos)
Join sets of typeinfos.static java.lang.Object
objectFromByteArray(byte[] val, java.lang.ClassLoader classloader, IErrorReporter rep)
Convert a byte array (of an xml) to an object.static java.lang.Object
objectFromByteArray(byte[] val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler, IErrorReporter rep)
Convert a byte array (of an xml) to an object.static java.lang.Object
objectFromInputStream(java.io.InputStream val, java.lang.ClassLoader classloader, IErrorReporter rep)
Convert a byte array (of an xml) to an object.static java.lang.Object
objectFromInputStream(java.io.InputStream val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler, IErrorReporter rep)
Convert a byte array (of an xml) to an object.static <T> T
objectFromXML(java.lang.String val, java.lang.ClassLoader classloader)
Convert an xml to an object.static <T> T
objectFromXML(java.lang.String val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler)
Convert an xml to an object.
-
-
-
Field Detail
-
reader
protected static volatile AReader reader
The reader.
-
pathmanager
protected static volatile TypeInfoPathManager pathmanager
The path manager.
-
handler
protected static volatile IObjectReaderHandler handler
The type manager.
-
-
Method Detail
-
joinTypeInfos
public static java.util.Set<TypeInfo> joinTypeInfos(java.util.Set<TypeInfo> typeinfos)
Join sets of typeinfos.- Parameters:
typeinfos
- The user specific type infos.- Returns:
- The joined type infos.
-
getTypeInfos
public static java.util.Set<TypeInfo> getTypeInfos()
Get the java type infos. Supported types: - java.util.Map - jadex.commons.collection.MultiCollection - java.util.List - java.util.Set - Array - java.util.Color - java.util.Date - java.util.Calendar - java.util.Currency - java.lang.Class - java.net.URL - java.logging.Level - java.logging.LogRecord - java.net.InetAddress - java.awt.image.RenderedImage - java.lang.String - java.lang.Boolean - java.lang.Integer - java.lang.Double - java.lang.Float - java.lang.Long - java.lang.Short - java.lang.Byte - java.lang.Character - java.lang.enum - boolean/Boolean Array - int/Integer Array - double/Double Array - float/Float array - long/Long array - short/Short Array - byte/Byte Array - java.lang.Character - jadex.commons.Tuple - jadex.commons.Tuple2 - jadex.commons.Tuple3 - java.util.UUID - java.security.Certifcate - java.lang.Throwable
-
objectFromXML
public static <T> T objectFromXML(java.lang.String val, java.lang.ClassLoader classloader)
Convert an xml to an object.- Parameters:
val
- The string value.- Returns:
- The decoded object.
-
objectFromByteArray
public static java.lang.Object objectFromByteArray(byte[] val, java.lang.ClassLoader classloader, IErrorReporter rep)
Convert a byte array (of an xml) to an object.- Parameters:
val
- The byte array.classloader
- The class loader.- Returns:
- The decoded object.
-
objectFromInputStream
public static java.lang.Object objectFromInputStream(java.io.InputStream val, java.lang.ClassLoader classloader, IErrorReporter rep)
Convert a byte array (of an xml) to an object.- Parameters:
val
- The input stream.classloader
- The class loader.- Returns:
- The decoded object.
-
objectFromXML
public static <T> T objectFromXML(java.lang.String val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler)
Convert an xml to an object.- Parameters:
val
- The string value.- Returns:
- The decoded object.
-
objectFromByteArray
public static java.lang.Object objectFromByteArray(byte[] val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler, IErrorReporter rep)
Convert a byte array (of an xml) to an object.- Parameters:
val
- The byte array.classloader
- The class loader.- Returns:
- The decoded object.
-
objectFromInputStream
public static java.lang.Object objectFromInputStream(java.io.InputStream val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler, IErrorReporter rep)
Convert a byte array (of an xml) to an object.- Parameters:
val
- The input stream.classloader
- The class loader.- Returns:
- The decoded object.
-
getPathManager
public static TypeInfoPathManager getPathManager()
Get the default Java reader.- Returns:
- The Java reader.
-
getObjectHandler
public static IObjectReaderHandler getObjectHandler()
Get the default Java reader.- Returns:
- The Java reader.
-
-