Class MacOSXLibraryDL

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

public class MacOSXLibraryDL extends MacOSXLibrary
Implements a SharedLibrary on the macOS using dlopen.
  • Constructor Details

    • MacOSXLibraryDL

      public MacOSXLibraryDL(String name)
    • MacOSXLibraryDL

      public MacOSXLibraryDL(String name, long handle)
  • Method Details

    • 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.