Interface IOKitProvider


public interface IOKitProvider
Abstracts IOKit registry operations so that iteration logic can be shared between JNA and FFM implementations.
  • Method Details

    • withMatchingService

      <T> T withMatchingService(String serviceName, Function<IOKitProvider.RegistryEntry, T> extractor)
      Looks up a single IORegistry service by class name, extracts a result, and releases the entry.
      Type Parameters:
      T - the result type
      Parameters:
      serviceName - the IOService class name (e.g. "IOPlatformExpertDevice")
      extractor - function applied to the matched entry; receives a non-null IOKitProvider.RegistryEntry
      Returns:
      the extracted value, or null if the service was not found
    • forEachMatchingService

      void forEachMatchingService(String serviceName, Consumer<IOKitProvider.RegistryEntry> consumer)
      Iterates all IORegistry services matching a class name, invoking a consumer for each entry. Entries and the iterator are released automatically.
      Parameters:
      serviceName - the IOService class name (e.g. "IOPlatformDevice")
      consumer - consumer invoked for each matched entry
    • forEachMatchingServiceUntil

      void forEachMatchingServiceUntil(String serviceName, Predicate<IOKitProvider.RegistryEntry> visitor)
      Iterates all IORegistry services matching a class name, invoking a function for each entry. If the function returns true, iteration stops early. Entries and the iterator are released automatically.
      Parameters:
      serviceName - the IOService class name (e.g. "AppleARMIODevice")
      visitor - function invoked for each matched entry; return true to stop iteration