Class MacForeignFunctions

java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.mac.MacForeignFunctions
Direct Known Subclasses:
CoreFoundationFunctions, CoreGraphicsFunctions, DiskArbitrationFunctions, IOKitFunctions, IOReportFunctions, MacSystemFunctions, SystemConfigurationFunctions

public abstract class MacForeignFunctions extends ForeignFunctions
Base class for macOS FFM function bindings, adding framework lookup support on top of ForeignFunctions.
  • Field Details

    • FRAMEWORK_SEARCH_PATHS

      protected static final List<String> FRAMEWORK_SEARCH_PATHS
      Search paths for macOS frameworks, in priority order.
      • /System/Library/Frameworks - Reserved strictly for Apple's core OS frameworks (e.g. IOKit, CoreFoundation, AppKit).
      • /Library/Frameworks - Standard location for third-party frameworks available to all users (e.g. SDL2, GStreamer, or custom drivers).
  • Constructor Details

    • MacForeignFunctions

      protected MacForeignFunctions()
      Not intended for instantiation.
  • Method Details

    • frameworkLookup

      protected static SymbolLookup frameworkLookup(String frameworkName)
      Lookup a macOS framework by simple name, e.g. "IOKit". Searches FRAMEWORK_SEARCH_PATHS in order.
      Parameters:
      frameworkName - the framework name without path or extension
      Returns:
      the symbol lookup for the framework
      Throws:
      IllegalArgumentException - if the framework is not found in any search path