Top Description Fields Constructors Methods
org.freedesktop.dbus.utils.translator

public final Class DBusTypeStringToJava

extends Object
Class Inheritance
Imports
org.freedesktop.dbus.Marshalling, .Struct, org.freedesktop.dbus.exceptions.DBusException, org.freedesktop.dbus.types.DBusListType, .DBusMapType, .DBusStructType, java.lang.reflect.Type, java.util.ArrayList, .List, .Map

Reads a DBus signature string and converts it to java classes tree.
Uses a DBus signature string like "a(ia{sv})" and converts it something like:
java.util.List
   org.freedesktop.dbus.Struct
         java.lang.Integer
         java.util.Map
               java.lang.String
               org.freedesktop.dbus.types.Variant
Each indent step represents another step in the hierarchy.
Classes listed in the same indent level are part of the same structure (e.g. Map, Struct).

In the example above, the signature was translated to a List of Struct where the Struct has an Integer and a Map member. The Map consists of a CharSequence/String as key and a Variant as value.

Call the static main of this class with the signature which should be translated as first argument.

Author
hypfvieh
Since
v3.3.0 - 2020-12-28

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
main(String[] _args)

private static void
recursive(Type _t, int _indent)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INDENTback to summary
private static final String INDENT

Constructor Detail

DBusTypeStringToJavaback to summary
private DBusTypeStringToJava()

Method Detail

mainback to summary
public static void main(String[] _args) throws DBusException
recursiveback to summary
private static void recursive(Type _t, int _indent)