public final class Library extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addLibraryPath(String libraryName,
File path)
Adds a custom search path for a library
|
static Library |
getInstance(String libraryName) |
static List<String> |
getLibraryPath(String libraryName)
Gets the custom search path for a library.
|
String |
getName()
Gets the name of this library
|
static Runtime |
getRuntime(Object obj) |
static <T> T |
loadLibrary(Class<T> interfaceClass,
Map<LibraryOption,?> libraryOptions,
String... libraryNames)
Loads a native library and links the methods defined in
interfaceClass
to native methods in the library. |
static <T> T |
loadLibrary(Class<T> interfaceClass,
String... libraryNames)
Loads a native library and links the methods defined in
interfaceClass
to native methods in the library. |
static <T> T |
loadLibrary(String libraryName,
Class<T> interfaceClass)
Loads a native library and links the methods defined in
interfaceClass
to native methods in the library. |
static <T> T |
loadLibrary(String libraryName,
Class<T> interfaceClass,
Map<LibraryOption,?> libraryOptions)
Loads a native library and links the methods defined in
interfaceClass
to native methods in the library. |
public static <T> T loadLibrary(String libraryName, Class<T> interfaceClass)
interfaceClass
to native methods in the library.libraryName
- the name of the library to loadinterfaceClass
- the interface that describes the native library interfaceinterfaceclass
that will call the native methods.public static <T> T loadLibrary(Class<T> interfaceClass, String... libraryNames)
interfaceClass
to native methods in the library.libraryName
- the name of the library to loadinterfaceClass
- the interface that describes the native library interfaceinterfaceclass
that will call the native methods.public static <T> T loadLibrary(String libraryName, Class<T> interfaceClass, Map<LibraryOption,?> libraryOptions)
interfaceClass
to native methods in the library.libraryName
- the name of the library to loadinterfaceClass
- the interface that describes the native library interfacelibraryOptions
- optionsinterfaceclass
that will call the native methods.public static <T> T loadLibrary(Class<T> interfaceClass, Map<LibraryOption,?> libraryOptions, String... libraryNames)
interfaceClass
to native methods in the library.libraryName
- the name of the library to loadinterfaceClass
- the interface that describes the native library interfacelibraryOptions
- optionsinterfaceclass
that will call the native methods.public static final void addLibraryPath(String libraryName, File path)
libraryName
- the name of the library to search forpath
- the path to search for the library inpublic static List<String> getLibraryPath(String libraryName)
libraryName
- The library to retrieve the path for.public String getName()
Copyright © 2013. All Rights Reserved.