|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kenai.jaffl.FFIProvider
com.kenai.jaffl.provider.jffi.Provider
public class Provider
Constructor Summary | |
---|---|
Provider()
|
Method Summary | ||
---|---|---|
int |
getLastError()
Gets the last native error code. |
|
MemoryManager |
getMemoryManager()
Gets the native memory manager for this provider. |
|
Type |
getType(NativeType type)
|
|
|
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. |
|
|
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. |
|
void |
setLastError(int error)
Sets the native error code. |
Methods inherited from class com.kenai.jaffl.FFIProvider |
---|
getProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Provider()
Method Detail |
---|
public MemoryManager getMemoryManager()
FFIProvider
getMemoryManager
in class FFIProvider
MemoryManager
public <T> T loadLibrary(String libraryName, Class<T> interfaceClass, Map<LibraryOption,?> libraryOptions)
FFIProvider
interfaceClass
to native methods in the library.
loadLibrary
in class FFIProvider
libraryName
- the name of the library to loadinterfaceClass
- the interface that describes the native library interfacelibraryOptions
- options
interfaceclass
that will call the native methods.public <T> T loadLibrary(Class<T> interfaceClass, Map<LibraryOption,?> libraryOptions, String... libraryNames)
FFIProvider
interfaceClass
to native methods in the library.
loadLibrary
in class FFIProvider
interfaceClass
- the interface that describes the native library interfacelibraryOptions
- optionslibraryNames
- the list of libraries to load
interfaceclass
that will call the native methods.public int getLastError()
FFIProvider
This returns the errno value that was set at the time of the last native function call.
getLastError
in class FFIProvider
public void setLastError(int error)
FFIProvider
setLastError
in class FFIProvider
error
- The value to set errno to.public Type getType(NativeType type)
getType
in class FFIProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |