INativeInterfacepublic class JnaNativeInterface extends java.lang.Object implements INativeInterface
INativeInterface implemented using JNA, a LGPL licensed Java
native interface abstraction.
In our point of view, JNA has the power of deploying all what we wanted to have, but is ill designed in some key hot spots - so we worked around and built on top of our own interfaces.
| Constructor | Description |
|---|---|
JnaNativeInterface() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addSearchPath(java.lang.String path) |
Add a directory to the search path.
|
INativeHandle |
allocate(int size) |
Allocate c memory and return the respective
INativeHandle. |
INativeCallback |
createCallback(ICallback callback) |
|
INativeFunction |
createFunction(long address) |
Create an
INativeFunction from a function pointer. |
INativeHandle |
createHandle(long address) |
Create a void
INativeHandle to a memory address. |
INativeLibrary |
createLibrary(java.lang.String name) |
Load a new
INativeLibrary. |
protected java.util.List<java.lang.String> |
getSearchPaths() |
|
int |
longSize() |
The platform long size.
|
int |
pointerSize() |
The platform pointer size.
|
int |
wideCharSize() |
The platform wide char size.
|
public void addSearchPath(java.lang.String path)
INativeInterfaceaddSearchPath in interface INativeInterfacepath - The path to be added;public INativeHandle allocate(int size)
INativeInterfaceINativeHandle.allocate in interface INativeInterfacesize - The size in bytes.INativeHandlepublic INativeCallback createCallback(ICallback callback)
createCallback in interface INativeInterfacepublic INativeFunction createFunction(long address)
INativeInterfaceINativeFunction from a function pointer.
There is no special handling for the 0 address!
createFunction in interface INativeInterfaceaddress - The function pointer.public INativeHandle createHandle(long address)
INativeInterfaceINativeHandle to a memory address.
There is no special handling for the 0 address!
createHandle in interface INativeInterfaceaddress - The memory address.public INativeLibrary createLibrary(java.lang.String name)
INativeInterfaceINativeLibrary.createLibrary in interface INativeInterfacename - The name of the library to load.INativeLibraryprotected java.util.List<java.lang.String> getSearchPaths()
public int longSize()
INativeInterfacelongSize in interface INativeInterfacepublic int pointerSize()
INativeInterfacepointerSize in interface INativeInterfacepublic int wideCharSize()
INativeInterfacewideCharSize in interface INativeInterface