Klasse StructTreeBuilder

java.lang.Object
org.freedesktop.dbus.utils.generator.StructTreeBuilder

public class StructTreeBuilder extends Object
Helper to create a DBus struct class. As Structs are regular classes (POJOs) in Java, this helper also takes care about recursion (Struct in Struct/Map/List).
Seit:
v3.0.1 - 2018-12-21
Autor:
hypfvieh
  • Konstruktordetails

    • StructTreeBuilder

      public StructTreeBuilder()
  • Methodendetails

    • buildStructClasses

      public String buildStructClasses(String _dbusSig, String _structName, ClassBuilderInfo _clzBldr, List<ClassBuilderInfo> _generatedClasses) throws DBusException
      Builds the struct(s) found in _dbusSig. If the struct is wrapped in a Collection, it will be unwrapped.

      The resulting String will return the parent class name. This can be the Structs classname or e.g. List/Set class if the struct was wrapped in a Collection.

      Structs which are inside of another struct will get the appendix 'Struct' for each iteration. This may lead to classes with names like FooStructStructStruct (FooStruct->(InnerStruct->InnerInnerStruct)).
      Parameter:
      _dbusSig - dbus Type string
      _structName - name the struct should have
      _clzBldr - class builder with the class where the struct was first seen
      _generatedClasses - a list, this will contain additional struct classes created, if any. Should never be null!
      Gibt zurück:
      Struct class name or Collection type name
      Löst aus:
      DBusException - on DBus Error