Package jnr.ffi
Class Library
java.lang.Object
jnr.ffi.Library
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddLibraryPath(String libraryName, File path) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.static LibrarygetInstance(String libraryName) Deprecated.getLibraryPath(String libraryName) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.getName()Deprecated.static RuntimegetRuntime(Object library) Deprecated.static <T> TloadLibrary(Class<T> interfaceClass, String... libraryNames) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.static <T> TloadLibrary(Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions, String... libraryNames) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.static <T> TloadLibrary(String libraryName, Class<T> interfaceClass) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.static <T> TloadLibrary(String libraryName, Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.
-
Method Details
-
getRuntime
Deprecated.Gets theRuntimethat loaded the library interface.- Parameters:
library- A library implementation as returned fromLibraryLoader.load()- Returns:
- The runtime that loaded the library.
-
loadLibrary
Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClassto native methods in the library.- Type Parameters:
T- the interface class.- Parameters:
libraryName- the name of the library to loadinterfaceClass- the interface that describes the native library interface- Returns:
- an instance of
interfaceclassthat will call the native methods.
-
loadLibrary
Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClassto native methods in the library.- Type Parameters:
T- the interface type.- Parameters:
libraryNames- the name of the library to loadinterfaceClass- the interface that describes the native library interface- Returns:
- an instance of
interfaceclassthat will call the native methods.
-
loadLibrary
public static <T> T loadLibrary(String libraryName, Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClassto native methods in the library.- Type Parameters:
T- the interface type.- Parameters:
libraryName- the name of the library to loadinterfaceClass- the interface that describes the native library interfacelibraryOptions- options- Returns:
- an instance of
interfaceclassthat will call the native methods.
-
loadLibrary
public static <T> T loadLibrary(Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions, String... libraryNames) Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClassto native methods in the library.- Type Parameters:
T- the interface type.- Parameters:
libraryNames- the name of the library to loadinterfaceClass- the interface that describes the native library interfacelibraryOptions- options- Returns:
- an instance of
interfaceclassthat will call the native methods.
-
addLibraryPath
Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.Adds a custom search path for a library- Parameters:
libraryName- the name of the library to search forpath- the path to search for the library in
-
getLibraryPath
Deprecated.seeLibraryLoaderfor the preferred interface to loading libraries.Gets the custom search path for a library.- Parameters:
libraryName- The library to retrieve the path for.- Returns:
- A
ListofStringinstances.
-
getInstance
Deprecated. -
getName
Deprecated.
-
LibraryLoaderinstead.