Package jnr.ffi
Class Platform.Linux
java.lang.Object
jnr.ffi.Platform
jnr.ffi.Platform.Supported
jnr.ffi.Platform.Linux
- Enclosing class:
- Platform
A
Platform
subclass representing the Linux operating system.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class jnr.ffi.Platform
Platform.CPU, Platform.IbmI, Platform.Linux, Platform.OS
-
Field Summary
Fields inherited from class jnr.ffi.Platform
libPattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
compareVersions
(int[] version1, int[] version2) private List<Platform.Linux.Match>
getMatches
(String libName, List<String> libraryPaths) locateLibrary
(String libName, List<String> libraryPaths) Searches through a list of directories for a native library.locateLibrary
(String libName, List<String> libraryPaths, Map<LibraryOption, Object> options) Searches through a list of directories for a native library.mapLibraryName
(String libName) Maps from a generic library name (e.g.Methods inherited from class jnr.ffi.Platform
addressSize, getCPU, getName, getNativePlatform, getOS, getOSName, getPlatform, getStandardCLibraryName, getVersion, getVersionMajor, getVersionMinor, is32Bit, is64Bit, isBigEndian, isBSD, isLittleEndian, isUnix, libraryLocations, longSize
-
Constructor Details
-
Linux
public Linux()
-
-
Method Details
-
locateLibrary
Description copied from class:Platform
Searches through a list of directories for a native library.- Overrides:
locateLibrary
in classPlatform
- Parameters:
libName
- the base name (e.g. "c") of the library to locatelibraryPaths
- 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 classPlatform
- Parameters:
libName
- the base name (e.g. "c") of the library to locatelibraryPaths
- the list of directories to searchoptions
- map ofLibraryOption
s to customize search behavior such asLibraryOption.PreferCustomPaths
- Returns:
- the path of the library
-
getMatches
-
compareVersions
private static int compareVersions(int[] version1, int[] version2) -
mapLibraryName
Description copied from class:Platform
Maps from a generic library name (e.g. "c") to the platform specific library name.- Overrides:
mapLibraryName
in classPlatform
- Parameters:
libName
- The library name to map- Returns:
- The mapped library name.
-