IOKit.IORegistryEntry (JNA API)
Description: declaration: package: com.sun.jna.platform.mac, interface: IOKit, class: IORegistryEntry

Package com.sun.jna.platform.mac

# Class IOKit.IORegistryEntry

java.lang.Object
com.sun.jna.PointerType
com.sun.jna.platform.mac.IOKit.IOObject
com.sun.jna.platform.mac.IOKit.IORegistryEntry

All Implemented Interfaces:
  `NativeMapped`

Direct Known Subclasses:
  `IOKit.IOService`

Enclosing interface:
  IOKit

public static class IOKit.IORegistryEntry extends IOKit.IOObject
The base class for all objects in the registry.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IORegistryEntry()`
  `IORegistryEntry(Pointer p)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CoreFoundation.CFMutableDictionaryRef`
  `createCFProperties()`
  Convenience method for `IOKit.IORegistryEntryCreateCFProperties(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.ptr.PointerByReference, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` to create a CF dictionary representation of this registry entry's property table.
  `CoreFoundation.CFTypeRef`
  `createCFProperty(CoreFoundation.CFStringRef key)`
  Convenience method for `IOKit.IORegistryEntryCreateCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` to create a CF representation of this registry entry's property.
  `Boolean`
  `getBooleanProperty(String key)`
  Convenience method to get a `Boolean` value from this IO Registry Entry.
  `byte[]`
  `getByteArrayProperty(String key)`
  Convenience method to get a `byte` array value from this IO Registry Entry.
  `IOKit.IORegistryEntry`
  `getChildEntry(String plane)`
  Convenience method for `IOKit.IORegistryEntryGetChildEntry(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)` to return the first child of this registry entry in a plane.
  `IOKit.IOIterator`
  `getChildIterator(String plane)`
  Convenience method for `IOKit.IORegistryEntryGetChildIterator(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)` to return an iterator over this registry entry’s child entries in a plane.
  `Double`
  `getDoubleProperty(String key)`
  Convenience method to get a `Double` value from this IO Registry Entry.
  `Integer`
  `getIntegerProperty(String key)`
  Convenience method to get an `Integer` value from this IO Registry Entry.
  `Long`
  `getLongProperty(String key)`
  Convenience method to get a `Long` value from this IO Registry Entry.
  `String`
  `getName()`
  Convenience method for `IOKit.IORegistryEntryGetName(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.Pointer)` to return a name assigned to this registry entry.
  `IOKit.IORegistryEntry`
  `getParentEntry(String plane)`
  Convenience method for `IOKit.IORegistryEntryGetParentEntry(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)` to return the first parent of this registry entry in a plane.
  `long`
  `getRegistryEntryID()`
  Convenience method for `IOKit.IORegistryEntryGetRegistryEntryID(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.ptr.LongByReference)` to return an ID for this registry entry that is global to all tasks.
  `String`
  `getStringProperty(String key)`
  Convenience method to get a `String` value from this IO Registry Entry.
  `(package private) CoreFoundation.CFTypeRef`
  `searchCFProperty(String plane, CoreFoundation.CFStringRef key, int options)`
  Convenience method for `IOKit.IORegistryEntrySearchCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` to create a CF representation of a registry entry's property searched from this object.

  ### Methods inherited from class com.sun.jna.platform.mac.IOKit.IOObject

  `conformsTo, release`

  ### Methods inherited from class com.sun.jna.PointerType

  `equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IORegistryEntry

    public IORegistryEntry()

  - ### IORegistryEntry

    public IORegistryEntry(Pointer p)

- ## Method Details

  - ### getRegistryEntryID

    public long getRegistryEntryID()
    Convenience method for `IOKit.IORegistryEntryGetRegistryEntryID(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.ptr.LongByReference)` to return an ID for this registry entry that is global to all tasks.
    Returns:
      the ID.
    Throws:
      `IOReturnException` - if the ID could not be retrieved.

  - ### getName

    public String getName()
    Convenience method for `IOKit.IORegistryEntryGetName(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.Pointer)` to return a name assigned to this registry entry.
    Returns:
      The name
    Throws:
      `IOReturnException` - if the name could not be retrieved.

  - ### getChildIterator

    public IOKit.IOIterator getChildIterator(String plane)
    Convenience method for `IOKit.IORegistryEntryGetChildIterator(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)` to return an iterator over this registry entry’s child entries in a plane.
    Parameters:
      `plane` - The name of an existing registry plane. Plane names are defined in `IOKitKeys.h`, for example, `kIOServicePlane`.
    Returns:
      The iterator
    Throws:
      `IOReturnException` - if the iterator could not be retrieved.

  - ### getChildEntry

    public IOKit.IORegistryEntry getChildEntry(String plane)
    Convenience method for `IOKit.IORegistryEntryGetChildEntry(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)` to return the first child of this registry entry in a plane.
    Parameters:
      `plane` - The name of an existing registry plane.
    Returns:
      The child registry entry, if a child exists, null otherwise
    Throws:
      `IOReturnException` - if the entry exists but could not be retrieved.

  - ### getParentEntry

    public IOKit.IORegistryEntry getParentEntry(String plane)
    Convenience method for `IOKit.IORegistryEntryGetParentEntry(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.ptr.PointerByReference)` to return the first parent of this registry entry in a plane.
    Parameters:
      `plane` - The name of an existing registry plane.
    Returns:
      The parent registry entry, if a parent exists, null otherwise
    Throws:
      `IOReturnException` - if the entry exists but could not be retrieved.

  - ### createCFProperty

    public CoreFoundation.CFTypeRef createCFProperty(CoreFoundation.CFStringRef key)
    Convenience method for `IOKit.IORegistryEntryCreateCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` to create a CF representation of this registry entry's property.
    Parameters:
      `key` - A `CFString` specifying the property name.
    Returns:
      A CF container is created and returned the caller on success.

      The caller should release with `CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)`.

  - ### createCFProperties

    public CoreFoundation.CFMutableDictionaryRef createCFProperties()
    Convenience method for `IOKit.IORegistryEntryCreateCFProperties(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.ptr.PointerByReference, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` to create a CF dictionary representation of this registry entry's property table.
    Returns:
      The property table.

      The caller should release with `CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)`.

    Throws:
      `IOReturnException` - if the entry could not be retrieved.

  - ### searchCFProperty

    CoreFoundation.CFTypeRef searchCFProperty(String plane, CoreFoundation.CFStringRef key, int options)
    Convenience method for `IOKit.IORegistryEntrySearchCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, java.lang.String, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` to create a CF representation of a registry entry's property searched from this object.
    Parameters:
      `plane` - The name of an existing registry plane. Plane names are defined in `IOKitKeys.h`, for example, `kIOServicePlane`.
      `key` - A `CFString` specifying the property name.
      `options` - `IOKit.kIORegistryIterateRecursively` may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard `IOKit.IORegistryEntryCreateCFProperty(com.sun.jna.platform.mac.IOKit.IORegistryEntry, com.sun.jna.platform.mac.CoreFoundation.CFStringRef, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, int)` call. `IOKit.kIORegistryIterateParents` may be set to iterate the parents of the entry, in place of the children.
    Returns:
      A CF container is created and returned the caller on success. The caller should release with CFRelease.

  - ### getStringProperty

    public String getStringProperty(String key)
    Convenience method to get a `String` value from this IO Registry Entry.
    Parameters:
      `key` - The string name of the key to retrieve
    Returns:
      The value of the registry entry if it exists; `null` otherwise

  - ### getLongProperty

    public Long getLongProperty(String key)
    Convenience method to get a `Long` value from this IO Registry Entry.
    Parameters:
      `key` - The string name of the key to retrieve
    Returns:
      The value of the registry entry if it exists; `null` otherwise

      This method assumes a 64-bit integer is stored and does not do type checking. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.

  - ### getIntegerProperty

    public Integer getIntegerProperty(String key)
    Convenience method to get an `Integer` value from this IO Registry Entry.
    Parameters:
      `key` - The string name of the key to retrieve
    Returns:
      The value of the registry entry if it exists; `null` otherwise

      This method assumes a 32-bit integer is stored and does not do type checking. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.

  - ### getDoubleProperty

    public Double getDoubleProperty(String key)
    Convenience method to get a `Double` value from this IO Registry Entry.
    Parameters:
      `key` - The string name of the key to retrieve
    Returns:
      The value of the registry entry if it exists; `null` otherwise

      This method assumes a floating point value is stored and does not do type checking. If this object's type differs from the return type, and the conversion is lossy or the return value is out of range, then this method returns an approximate value.

  - ### getBooleanProperty

    public Boolean getBooleanProperty(String key)
    Convenience method to get a `Boolean` value from this IO Registry Entry.
    Parameters:
      `key` - The string name of the key to retrieve
    Returns:
      The value of the registry entry if it exists; `null` otherwise

  - ### getByteArrayProperty

    public byte[] getByteArrayProperty(String key)
    Convenience method to get a `byte` array value from this IO Registry Entry.
    Parameters:
      `key` - The string name of the key to retrieve
    Returns:
      The value of the registry entry if it exists; `null` otherwise