|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.intarsys.nativec.jna.JnaNativeInterface
public class JnaNativeInterface
An 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 Summary | |
|---|---|
JnaNativeInterface()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JnaNativeInterface()
| Method Detail |
|---|
public void addSearchPath(java.lang.String path)
INativeInterface
addSearchPath 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()
INativeInterface
longSize in interface INativeInterfacepublic int pointerSize()
INativeInterface
pointerSize in interface INativeInterfacepublic int wideCharSize()
INativeInterface
wideCharSize in interface INativeInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||