Class DBusAnnotationInfo

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gio.DBusAnnotationInfo
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class DBusAnnotationInfo extends ProxyInstance
Information about an annotation.
Since:
2.26
  • Constructor Details

    • DBusAnnotationInfo

      public DBusAnnotationInfo(MemorySegment address)
      Create a DBusAnnotationInfo proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • DBusAnnotationInfo

      public DBusAnnotationInfo(Arena arena)
      Allocate a new DBusAnnotationInfo.
      Parameters:
      arena - to control the memory allocation scope
    • DBusAnnotationInfo

      public DBusAnnotationInfo()
      Allocate a new DBusAnnotationInfo. The memory is allocated with Arena.ofAuto().
    • DBusAnnotationInfo

      public DBusAnnotationInfo(int refCount, String key, String value, DBusAnnotationInfo[] annotations, Arena arena)
      Allocate a new DBusAnnotationInfo with the fields set to the provided values.
      Parameters:
      refCount - value for the field refCount
      key - value for the field key
      value - value for the field value
      annotations - value for the field annotations
      arena - to control the memory allocation scope
    • DBusAnnotationInfo

      public DBusAnnotationInfo(int refCount, String key, String value, DBusAnnotationInfo[] annotations)
      Allocate a new DBusAnnotationInfo with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      refCount - value for the field refCount
      key - value for the field key
      value - value for the field value
      annotations - value for the field annotations
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the DBusAnnotationInfo class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readRefCount

      public int readRefCount()
      Read the value of the field ref_count.
      Returns:
      The value of the field ref_count
    • writeRefCount

      public void writeRefCount(int refCount)
      Write a value in the field ref_count.
      Parameters:
      refCount - The new value for the field ref_count
    • readKey

      public String readKey()
      Read the value of the field key.
      Returns:
      The value of the field key
    • writeKey

      public void writeKey(String key, Arena _arena)
      Write a value in the field key.
      Parameters:
      key - The new value for the field key
      _arena - to control the memory allocation scope
    • readValue

      public String readValue()
      Read the value of the field value.
      Returns:
      The value of the field value
    • writeValue

      public void writeValue(String value, Arena _arena)
      Write a value in the field value.
      Parameters:
      value - The new value for the field value
      _arena - to control the memory allocation scope
    • readAnnotations

      public @Nullable DBusAnnotationInfo @Nullable [] readAnnotations()
      Read the value of the field annotations.
      Returns:
      The value of the field annotations
    • writeAnnotations

      public void writeAnnotations(@Nullable DBusAnnotationInfo @Nullable [] annotations, Arena _arena)
      Write a value in the field annotations.
      Parameters:
      annotations - The new value for the field annotations
      _arena - to control the memory allocation scope
    • lookup

      public static @Nullable String lookup(@Nullable DBusAnnotationInfo @Nullable [] annotations, String name)

      Looks up the value of an annotation.

      The cost of this function is O(n) in number of annotations.

      Parameters:
      annotations - A null-terminated array of annotations or null.
      name - The name of the annotation to look up.
      Returns:
      The value or null if not found. Do not free, it is owned by annotations.
      Since:
      2.26
    • ref

      public DBusAnnotationInfo ref()
      If this DBusAnnotationInfo is statically allocated does nothing. Otherwise increases the reference count.
      Returns:
      The same info.
      Since:
      2.26
    • unref

      public void unref()
      If this DBusAnnotationInfo is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed.
      Since:
      2.26