public abstract class NFIBackendTools extends Object
| Constructor and Description |
|---|
NFIBackendTools() |
| Modifier and Type | Method and Description |
|---|---|
abstract Object |
createBindableSymbol(Object symbol)
Create an object wrapping a native symbol, fulfilling the contract of NFI symbols.
|
abstract Object |
createBoundSymbol(Object symbol,
Object signature)
Create an object wrapping a native symbol that is already bound to a signature.
|
public abstract Object createBindableSymbol(Object symbol)
NativeSymbolLibrary.
The returned object has an invocable member "bind" that can be used to bind NFI signatures to
the symbol. It will also forward the InteropLibrary#isPointer,
InteropLibrary#asPointer and InteropLibrary#toNative messages to the wrapped
symbol.
Implementations of NFIBackend should use this method to create the symbols contained
in a library. It may also be used for returning pointer values that can point to executable
code.public abstract Object createBoundSymbol(Object symbol, Object signature)
NFIBackendTools.createBindableSymbol(java.lang.Object).
Additionally, it is executable.