Package jnr.ffi
Class Platform.Linux
- java.lang.Object
-
- jnr.ffi.Platform
-
- jnr.ffi.Platform.Supported
-
- jnr.ffi.Platform.Linux
-
- Enclosing class:
- Platform
static final class Platform.Linux extends Platform.Supported
APlatform
subclass representing the Linux operating system.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Platform.Linux.Match
-
Nested 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 Constructor Description Linux()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
compareVersions(int[] version1, int[] version2)
private java.util.List<Platform.Linux.Match>
getMatches(java.lang.String libName, java.util.List<java.lang.String> libraryPaths)
java.lang.String
locateLibrary(java.lang.String libName, java.util.List<java.lang.String> libraryPaths)
Searches through a list of directories for a native library.java.lang.String
locateLibrary(java.lang.String libName, java.util.List<java.lang.String> libraryPaths, java.util.Map<LibraryOption,java.lang.Object> options)
Searches through a list of directories for a native library.java.lang.String
mapLibraryName(java.lang.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
-
-
-
-
Method Detail
-
locateLibrary
public java.lang.String locateLibrary(java.lang.String libName, java.util.List<java.lang.String> libraryPaths)
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 java.lang.String locateLibrary(java.lang.String libName, java.util.List<java.lang.String> libraryPaths, java.util.Map<LibraryOption,java.lang.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
private java.util.List<Platform.Linux.Match> getMatches(java.lang.String libName, java.util.List<java.lang.String> libraryPaths)
-
compareVersions
private static int compareVersions(int[] version1, int[] version2)
-
mapLibraryName
public java.lang.String mapLibraryName(java.lang.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 classPlatform
- Parameters:
libName
- The library name to map- Returns:
- The mapped library name.
-
-