Annotation Interface DBusProperty


@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface DBusProperty
Marks a field or getter/setter method as a D-Bus property.

This annotation can be applied to:

  • Fields - the field will be exposed as a read-write property
  • Getter methods - creates a read-only property
  • Setter methods - creates a write-only property
  • Both getter and setter - creates a read-write property

Example usage:


 @DBusProperty(name = "Version")
 private String version = "1.0.0";

 @DBusProperty
 public int getCount() {
     return count;
 }
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Property access modes.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The access mode for the property.
    The D-Bus property name.
  • Element Details

    • name

      String name
      The D-Bus property name. If not specified, the field name or method name (without get/set prefix) is used.
      Returns:
      the D-Bus property name
      Default:
      ""
    • access

      The access mode for the property.
      Returns:
      the property access mode
      Default:
      AUTO