Annotationsschnittstelle DBusProperty


Appends information about properties in the interface. The annotated properties are added to the introspection data. In case of complex type of the property please use TypeRef.

Usage:

 @DBusInterfaceName("com.example.Bar")
 @DBusProperty(name = "Name", type = String.class)
 @DBusProperty(name = "ListOfVariables", type = List.class, access = Access.READ)
 @DBusProperty(name = "MapOfStringList", type = ComplexTypeWithMapAndList.class, access = Access.READ)
 public interface Bar extends DBusInterface {

   // TypeRef allows to provide detailed information about type
   interface ComplexTypeWithMapAndList extends TypeRef<Map<String, List<String>>> {
   }
 }
 

As an alternative to this annotation, you might consider using DBusBoundProperty. This allows you to achieve the same results with less code.

.
Siehe auch:
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    static enum 
     
  • Erforderliche Elemente - Übersicht

    Erforderliche Elemente
    Modifizierer und Typ
    Erforderliches Element
    Beschreibung
    Property name
  • Optionale Elemente - Übersicht

    Optionale Elemente
    Modifizierer und Typ
    Optionales Element
    Beschreibung
    Property access type
    type of the property, in case of complex types please create custom interface that extends TypeRef
  • Elementdetails

    • name

      String name
      Property name
      Gibt zurück:
      name
    • type

      Class<?> type
      type of the property, in case of complex types please create custom interface that extends TypeRef
      Gibt zurück:
      type
      Standard:
      org.freedesktop.dbus.types.Variant.class
    • access

      Property access type
      Gibt zurück:
      access
      Standard:
      READ_WRITE