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