public abstract class Platform
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Platform.CPU
The common names of cpu architectures.
|
static class |
Platform.OS
The common names of operating systems.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.regex.Pattern |
libPattern |
Modifier and Type | Method and Description |
---|---|
long |
addressMask()
Gets the 32/64bit mask of a C address/pointer on the native platform.
|
int |
addressSize()
Gets the size of a C address/pointer on the native platform.
|
Platform.CPU |
getCPU()
Gets the current processor architecture the JVM is running on.
|
int |
getJavaMajorVersion()
Gets the version of the Java Virtual Machine (JVM) jffi is running on.
|
java.lang.String |
getName()
Gets the name of this Platform.
|
Platform.OS |
getOS()
Gets the current Operating System.
|
static Platform |
getPlatform()
Gets the current Platform
|
boolean |
isBSD() |
boolean |
isUnix() |
java.lang.String |
locateLibrary(java.lang.String libName,
java.util.List<java.lang.String> libraryPath)
Searches through a list of directories for a native library.
|
int |
longSize()
Gets the size of a C 'long' on the native platform.
|
java.lang.String |
mapLibraryName(java.lang.String libName)
Maps from a generic library name (e.g.
|
public static final Platform getPlatform()
public final Platform.OS getOS()
public final Platform.CPU getCPU()
public final int getJavaMajorVersion()
public final boolean isBSD()
public final boolean isUnix()
public final int longSize()
public final int addressSize()
public final long addressMask()
public java.lang.String getName()
public java.lang.String mapLibraryName(java.lang.String libName)
libName
- The library name to mappublic java.lang.String locateLibrary(java.lang.String libName, java.util.List<java.lang.String> libraryPath)
libName
- the base name (e.g. "c") of the library to locatelibraryPath
- the list of directories to search