Package jnr.ffi
Class Library
java.lang.Object
jnr.ffi.Library
Deprecated.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addLibraryPath
(String libraryName, File path) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.static Library
getInstance
(String libraryName) Deprecated.getLibraryPath
(String libraryName) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.getName()
Deprecated.static Runtime
getRuntime
(Object library) Deprecated.static <T> T
loadLibrary
(Class<T> interfaceClass, String... libraryNames) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.static <T> T
loadLibrary
(Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions, String... libraryNames) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.static <T> T
loadLibrary
(String libraryName, Class<T> interfaceClass) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.static <T> T
loadLibrary
(String libraryName, Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.
-
Field Details
-
customSearchPaths
Deprecated. -
name
Deprecated.The name of this library
-
-
Constructor Details
-
Library
Deprecated.
-
-
Method Details
-
getRuntime
Deprecated.Gets theRuntime
that loaded the library interface.- Parameters:
library
- A library implementation as returned fromLibraryLoader.load()
- Returns:
- The runtime that loaded the library.
-
loadLibrary
Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClass
to 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
interfaceclass
that will call the native methods.
-
loadLibrary
Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClass
to native methods in the library.- Type Parameters:
T
- the interface type.- Parameters:
interfaceClass
- the interface that describes the native library interfacelibraryNames
- the name of the library to load- Returns:
- an instance of
interfaceclass
that will call the native methods.
-
loadLibrary
public static <T> T loadLibrary(String libraryName, Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClass
to 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
interfaceclass
that will call the native methods.
-
loadLibrary
public static <T> T loadLibrary(Class<T> interfaceClass, Map<LibraryOption, ?> libraryOptions, String... libraryNames) Deprecated.seeLibraryLoader
for the preferred interface to loading libraries.Loads a native library and links the methods defined ininterfaceClass
to native methods in the library.- Type Parameters:
T
- the interface type.- Parameters:
interfaceClass
- the interface that describes the native library interfacelibraryOptions
- optionslibraryNames
- the name of the library to load- Returns:
- an instance of
interfaceclass
that will call the native methods.
-
addLibraryPath
Deprecated.seeLibraryLoader
for 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.seeLibraryLoader
for 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
List
ofString
instances.
-
getInstance
Deprecated. -
getName
Deprecated.
-
LibraryLoader
instead.