public class Marshalling
extends java.lang.Object
Constructor and Description |
---|
Marshalling() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object[] |
convertParameters(java.lang.Object[] parameters,
java.lang.reflect.Type[] types,
AbstractConnection conn)
Recursively converts types for serialization onto DBus.
|
static java.lang.String[] |
getDBusType(java.lang.reflect.Type c)
Will return the DBus type corresponding to the given Java type.
|
static java.lang.String |
getDBusType(java.lang.reflect.Type[] c)
Will return the DBus type corresponding to the given Java type.
|
static java.lang.String[] |
getDBusType(java.lang.reflect.Type c,
boolean basic)
Will return the DBus type corresponding to the given Java type.
|
static int |
getJavaType(java.lang.String dbus,
java.util.List<java.lang.reflect.Type> rv,
int limit)
Converts a dbus type string into Java Type objects,
|
static java.lang.String[] |
recursiveGetDBusType(java.lang.reflect.Type c,
boolean basic,
int level) |
public static java.lang.String getDBusType(java.lang.reflect.Type[] c) throws DBusException
c
- The Java types.DBusException
- If the given type cannot be converted to a DBus type.public static java.lang.String[] getDBusType(java.lang.reflect.Type c) throws DBusException
c
- The Java type.DBusException
- If the given type cannot be converted to a DBus type.public static java.lang.String[] getDBusType(java.lang.reflect.Type c, boolean basic) throws DBusException
c
- The Java type.basic
- If true enforces this to be a non-compound type. (compound types are Maps, Structs and Lists/arrays).DBusException
- If the given type cannot be converted to a DBus type.public static java.lang.String[] recursiveGetDBusType(java.lang.reflect.Type c, boolean basic, int level) throws DBusException
DBusException
public static int getJavaType(java.lang.String dbus, java.util.List<java.lang.reflect.Type> rv, int limit) throws DBusException
dbus
- The DBus type or types.rv
- Vector to return the types in.limit
- Maximum number of types to parse (-1 == nolimit).DBusException
public static java.lang.Object[] convertParameters(java.lang.Object[] parameters, java.lang.reflect.Type[] types, AbstractConnection conn) throws DBusException
parameters
- The parameters to convert.types
- The (possibly generic) types of the parameters.DBusException
- Thrown if there is an error in converting the objects.