Package jnr.ffi.provider.jffi
Class NativeLibraryLoader<T>
- java.lang.Object
-
- jnr.ffi.LibraryLoader<T>
-
- jnr.ffi.provider.jffi.NativeLibraryLoader<T>
-
class NativeLibraryLoader<T> extends LibraryLoader<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static booleanASM_ENABLED-
Fields inherited from class jnr.ffi.LibraryLoader
DEFAULT_LIBRARY
-
-
Constructor Summary
Constructors Constructor Description NativeLibraryLoader(java.lang.Class<T> interfaceClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TloadLibrary(java.lang.Class<T> interfaceClass, java.util.Collection<java.lang.String> libraryNames, java.util.Collection<java.lang.String> searchPaths, java.util.Map<LibraryOption,java.lang.Object> options, boolean failImmediately)Implemented by FFI providers to load the actual library.-
Methods inherited from class jnr.ffi.LibraryLoader
convention, create, failImmediately, library, load, load, loadLibrary, loadLibrary, map, map, map, map, mapper, mapper, mapper, option, saveError, search, searchDefault, stdcall
-
-
-
-
Constructor Detail
-
NativeLibraryLoader
NativeLibraryLoader(java.lang.Class<T> interfaceClass)
-
-
Method Detail
-
loadLibrary
public T loadLibrary(java.lang.Class<T> interfaceClass, java.util.Collection<java.lang.String> libraryNames, java.util.Collection<java.lang.String> searchPaths, java.util.Map<LibraryOption,java.lang.Object> options, boolean failImmediately)
Description copied from class:LibraryLoaderImplemented by FFI providers to load the actual library.- Specified by:
loadLibraryin classLibraryLoader<T>- Parameters:
interfaceClass- The java class that describes the functions to be mapped.libraryNames- A list of libraries to load and search for symbols.searchPaths- The paths to search for libraries to be loaded.options- The options to apply when loading the library.failImmediately- whether to fast-fail when the library does not implement the requested functions- Returns:
- an instance of
interfaceClassthat will call the native methods.
-
-