Class MacOSXLibraryBundle

All Implemented Interfaces:
AutoCloseable, FunctionProvider, NativeResource, Pointer, SharedLibrary

public class MacOSXLibraryBundle extends MacOSXLibrary
Implements a SharedLibrary on the macOS using CFBundle.
  • Constructor Details

    • MacOSXLibraryBundle

      public MacOSXLibraryBundle(String name, long bundleRef)
  • Method Details

    • getWithIdentifier

      public static MacOSXLibraryBundle getWithIdentifier(String bundleID)
    • create

      public static MacOSXLibraryBundle create(String path)
    • getPath

      @Nullable public String getPath()
      Description copied from interface: SharedLibrary
      Returns the library path, if available.
      Returns:
      the library path, or null if the path is not available.
    • getFunctionAddress

      public long getFunctionAddress(ByteBuffer functionName)
      Description copied from interface: FunctionProvider
      Returns the function address of the specified function. If the function is not supported, returns 0L.
      Parameters:
      functionName - the encoded name of the function to query
      Returns:
      the function address or 0L if the function is not supported
    • free

      public void free()
      Description copied from interface: NativeResource
      Frees any native resources held by this object.