org.freedesktop.dbus

Class Marshalling

public class Marshalling extends Object

Contains static methods for marshalling values.
Method Summary
static StringgetDBusType(Type[] c)
Will return the DBus type corresponding to the given Java type.
static String[]getDBusType(Type c)
Will return the DBus type corresponding to the given Java type.
static String[]getDBusType(Type c, boolean basic)
Will return the DBus type corresponding to the given Java type.
static intgetJavaType(String dbus, List<Type> rv, int limit)
Converts a dbus type string into Java Type objects,
static String[]recursiveGetDBusType(Type c, boolean basic, int level)

Method Detail

getDBusType

public static String getDBusType(Type[] c)
Will return the DBus type corresponding to the given Java type. Note, container type should have their ParameterizedType not their Class passed in here.

Parameters: c The Java types.

Returns: The DBus types.

Throws: DBusException If the given type cannot be converted to a DBus type.

getDBusType

public static String[] getDBusType(Type c)
Will return the DBus type corresponding to the given Java type. Note, container type should have their ParameterizedType not their Class passed in here.

Parameters: c The Java type.

Returns: The DBus type.

Throws: DBusException If the given type cannot be converted to a DBus type.

getDBusType

public static String[] getDBusType(Type c, boolean basic)
Will return the DBus type corresponding to the given Java type. Note, container type should have their ParameterizedType not their Class passed in here.

Parameters: c The Java type. basic If true enforces this to be a non-compound type. (compound types are Maps, Structs and Lists/arrays).

Returns: The DBus type.

Throws: DBusException If the given type cannot be converted to a DBus type.

getJavaType

public static int getJavaType(String dbus, List<Type> rv, int limit)
Converts a dbus type string into Java Type objects,

Parameters: dbus The DBus type or types. rv Vector to return the types in. limit Maximum number of types to parse (-1 == nolimit).

Returns: number of characters parsed from the type string.

recursiveGetDBusType

public static String[] recursiveGetDBusType(Type c, boolean basic, int level)