Package jnr.ffi

Class Platform.Linux

Enclosing class:
Platform

static final class Platform.Linux extends Platform.Supported
A Platform subclass representing the Linux operating system.
  • Constructor Details

    • Linux

      public Linux()
  • Method Details

    • locateLibrary

      public String locateLibrary(String libName, List<String> libraryPaths)
      Description copied from class: Platform
      Searches through a list of directories for a native library.
      Overrides:
      locateLibrary in class Platform
      Parameters:
      libName - the base name (e.g. "c") of the library to locate
      libraryPaths - the list of directories to search
      Returns:
      the path of the library
    • locateLibrary

      public String locateLibrary(String libName, List<String> libraryPaths, Map<LibraryOption,Object> options)
      Description copied from class: Platform
      Searches through a list of directories for a native library.
      Overrides:
      locateLibrary in class Platform
      Parameters:
      libName - the base name (e.g. "c") of the library to locate
      libraryPaths - the list of directories to search
      options - map of LibraryOptions to customize search behavior such as LibraryOption.PreferCustomPaths
      Returns:
      the path of the library
    • getMatches

      private List<Platform.Linux.Match> getMatches(String libName, List<String> libraryPaths)
    • compareVersions

      private static int compareVersions(int[] version1, int[] version2)
    • mapLibraryName

      public String mapLibraryName(String libName)
      Description copied from class: Platform
      Maps from a generic library name (e.g. "c") to the platform specific library name.
      Overrides:
      mapLibraryName in class Platform
      Parameters:
      libName - The library name to map
      Returns:
      The mapped library name.