Top Fields Constructors Methods
jnr.ffi.provider.jffi

pack-priv Class NativeLibraryLoader<T>

extends LibraryLoader<T>
Class Inheritance
Imports
jnr.ffi.LibraryOption, java.util.Collection, .Map

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
Inherited from jnr.ffi.LibraryLoader:
DEFAULT_LIBRARY

Constructor Summary

AccessConstructor and Description
pack-priv
NativeLibraryLoader(Class<T> interfaceClass)

Method Summary

Modifier and TypeMethod and Description
public T
loadLibrary(Class<T>
The java class that describes the functions to be mapped.
interfaceClass
,
Collection<String>
A list of libraries to load and search for symbols.
libraryNames
,
Collection<String>
The paths to search for libraries to be loaded.
searchPaths
,
Map<LibraryOption, Object>
The options to apply when loading the library.
options
,
boolean
whether to fast-fail when the library does not implement the requested functions
failImmediately
)

Implements abstract jnr.ffi.LibraryLoader.loadLibrary.

Implemented by FFI providers to load the actual library.
Inherited from jnr.ffi.LibraryLoader:
conventioncreatefailImmediatelylibraryloadloadloadLibraryloadLibrarymapmapmapmapmappermappermapperoptionsaveErrorsearchsearchDefaultstdcall

Field Detail

ASM_ENABLEDback to summary
pack-priv static final boolean ASM_ENABLED

Constructor Detail

NativeLibraryLoaderback to summary
pack-priv NativeLibraryLoader(Class<T> interfaceClass)

Method Detail

loadLibraryback to summary
public T loadLibrary(Class<T> interfaceClass, Collection<String> libraryNames, Collection<String> searchPaths, Map<LibraryOption, Object> options, boolean failImmediately)

Implements abstract jnr.ffi.LibraryLoader.loadLibrary.

Doc from jnr.ffi.LibraryLoader.loadLibrary.

Implemented by FFI providers to load the actual library.

Parameters
interfaceClass:Class<T>

The java class that describes the functions to be mapped.

libraryNames:Collection<String>

A list of libraries to load and search for symbols.

searchPaths:Collection<String>

The paths to search for libraries to be loaded.

options:Map<LibraryOption, Object>

The options to apply when loading the library.

failImmediately:boolean

whether to fast-fail when the library does not implement the requested functions

Returns:T

an instance of interfaceClass that will call the native methods.