Interface IOKitProvider
public interface IOKitProvider
Abstracts IOKit registry operations so that iteration logic can be shared between JNA and FFM implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA handle to an IORegistry entry, providing property access. -
Method Summary
Modifier and TypeMethodDescriptionvoidforEachMatchingService(String serviceName, Consumer<IOKitProvider.RegistryEntry> consumer) Iterates all IORegistry services matching a class name, invoking a consumer for each entry.voidforEachMatchingServiceUntil(String serviceName, Predicate<IOKitProvider.RegistryEntry> visitor) Iterates all IORegistry services matching a class name, invoking a function for each entry.<T> TwithMatchingService(String serviceName, Function<IOKitProvider.RegistryEntry, T> extractor) Looks up a single IORegistry service by class name, extracts a result, and releases the entry.
-
Method Details
-
withMatchingService
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-nullIOKitProvider.RegistryEntry- Returns:
- the extracted value, or
nullif the service was not found
-
forEachMatchingService
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 returnstrue, 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; returntrueto stop iteration
-