Top Description Inners Methods
org.freedesktop.dbus.annotations

public @Interface DBusProperty

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
@Repeatable:DBusProperties
Imports
org.freedesktop.dbus.annotations.PropertiesEmitsChangedSignal.EmitChangeSignal, org.freedesktop.dbus.types.Variant, java.lang.annotation.*

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 org.freedesktop.dbus.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.

.
See Also
org.freedesktop.dbus.interfaces.DBusInterface, org.freedesktop.dbus.annotations.DBusBoundProperty, org.freedesktop.dbus.TypeRef

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public DBusProperty.Access

Returns:

access type, never null
access
()

Specifies the access type of this property.

public PropertiesEmitsChangedSignal.EmitChangeSignal

Returns:

emitChangeSignal, never null
emitChangeSignal
()

Property which defines if a signal is emitted when the annotated property was changed.

public String

Returns:

name
name
()

Property name

public Class<?>

Returns:

type
type
()

type of the property, in case of complex types please create custom interface that extends org.freedesktop.dbus.TypeRef.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

accessback to summary
public DBusProperty.Access access()

Specifies the access type of this property.

Returns:DBusProperty.Access

access type, never null

emitChangeSignalback to summary
public PropertiesEmitsChangedSignal.EmitChangeSignal emitChangeSignal()

Property which defines if a signal is emitted when the annotated property was changed.

Returns:PropertiesEmitsChangedSignal.EmitChangeSignal

emitChangeSignal, never null

nameback to summary
public String name()

Property name

Returns:String

name

typeback to summary
public Class<?> type()

type of the property, in case of complex types please create custom interface that extends org.freedesktop.dbus.TypeRef.

Returns:Class<?>

type

org.freedesktop.dbus.annotations back to summary

public final Enum DBusProperty.Access

extends Enum<DBusProperty.Access>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
public static final DBusProperty.Access
public static final DBusProperty.Access
public static final DBusProperty.Access

Constructor Summary

AccessConstructor and Description
private
Access(String _accessName)

Method Summary

Modifier and TypeMethod and Description
public String
public static DBusProperty.Access
public static DBusProperty.Access[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

accessNameback to summary
private final String accessName
READback to summary
public static final DBusProperty.Access READ
READ_WRITEback to summary
public static final DBusProperty.Access READ_WRITE
WRITEback to summary
public static final DBusProperty.Access WRITE

Constructor Detail

Accessback to summary
private Access(String _accessName)

Method Detail

getAccessNameback to summary
public String getAccessName()
valueOfback to summary
public static DBusProperty.Access valueOf(String name)
valuesback to summary
public static DBusProperty.Access[] values()