public class Provider extends FFIProvider
| Constructor and Description |
|---|
Provider() |
| Modifier and Type | Method and Description |
|---|---|
int |
getLastError()
Gets the last native error code.
|
MemoryManager |
getMemoryManager()
Gets the native memory manager for this provider.
|
Type |
getType(NativeType type) |
<T> T |
loadLibrary(java.lang.Class<T> interfaceClass,
java.util.Map<LibraryOption,?> libraryOptions,
java.lang.String... libraryNames)
Loads a native library and links the methods defined in
interfaceClass
to native methods in the library. |
<T> T |
loadLibrary(java.lang.String libraryName,
java.lang.Class<T> interfaceClass,
java.util.Map<LibraryOption,?> libraryOptions)
Loads a native library and links the methods defined in
interfaceClass
to native methods in the library. |
void |
setLastError(int error)
Sets the native error code.
|
getProviderpublic MemoryManager getMemoryManager()
FFIProvidergetMemoryManager in class FFIProviderMemoryManagerpublic <T> T loadLibrary(java.lang.String libraryName,
java.lang.Class<T> interfaceClass,
java.util.Map<LibraryOption,?> libraryOptions)
FFIProviderinterfaceClass
to native methods in the library.loadLibrary in class FFIProviderlibraryName - the name of the library to loadinterfaceClass - the interface that describes the native library interfacelibraryOptions - optionsinterfaceclass that will call the native methods.public <T> T loadLibrary(java.lang.Class<T> interfaceClass,
java.util.Map<LibraryOption,?> libraryOptions,
java.lang.String... libraryNames)
FFIProviderinterfaceClass
to native methods in the library.loadLibrary in class FFIProviderinterfaceClass - the interface that describes the native library interfacelibraryOptions - optionslibraryNames - the list of libraries to loadinterfaceclass that will call the native methods.public int getLastError()
FFIProviderThis returns the errno value that was set at the time of the last native function call.
getLastError in class FFIProviderpublic void setLastError(int error)
FFIProvidersetLastError in class FFIProvidererror - The value to set errno to.public Type getType(NativeType type)
getType in class FFIProvider