Class DBusTypeStringToJava
- java.lang.Object
-
- org.freedesktop.dbus.utils.translator.DBusTypeStringToJava
-
public final class DBusTypeStringToJava extends java.lang.ObjectReads 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.VariantEach 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.
- Since:
- v3.3.0 - 2020-12-28
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringINDENT
-
Constructor Summary
Constructors Modifier Constructor Description privateDBusTypeStringToJava()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] _args)private static voidrecursive(java.lang.reflect.Type _t, int _indent)private static java.lang.Stringrepeat(java.lang.String _string, int _cnt)Repeat the given String given count times.
-
-
-
Field Detail
-
INDENT
private static final java.lang.String INDENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] _args) throws DBusException- Throws:
DBusException
-
recursive
private static void recursive(java.lang.reflect.Type _t, int _indent)
-
repeat
private static java.lang.String repeat(java.lang.String _string, int _cnt)Repeat the given String given count times.- Parameters:
_string- string to repeat_cnt- count- Returns:
- repeated string
-
-