public interface NativeFunctionInterface
| Modifier and Type | Method and Description |
|---|---|
NativeFunctionHandle |
getFunctionHandle(NativeFunctionPointer functionPointer,
Class<?> returnType,
Class<?>... argumentTypes)
Resolves a function pointer to a handle that can be called
with a given signature.
|
NativeFunctionHandle |
getFunctionHandle(NativeLibraryHandle[] libraries,
String name,
Class<?> returnType,
Class<?>... argumentTypes)
Resolves a function name to a handle that can be called
with a given signature.
|
NativeFunctionHandle |
getFunctionHandle(NativeLibraryHandle library,
String name,
Class<?> returnType,
Class<?>... argumentTypes)
Resolves a function name to a handle that can be called
with a given signature.
|
NativeFunctionHandle |
getFunctionHandle(String name,
Class<?> returnType,
Class<?>... argumentTypes)
Resolves a function name to a handle that can be called
with a given signature.
|
NativeFunctionPointer |
getFunctionPointer(NativeLibraryHandle[] libraries,
String name)
Resolves the function pointer
NativeFunctionPointer of a native function. |
NativeLibraryHandle |
getLibraryHandle(String libPath)
Resolves and returns a handle to an open native library.
|
NativeFunctionPointer |
getNativeFunctionPointerFromRawValue(long rawValue)
Creates a
NativeFunctionPointer from a raw value. |
boolean |
isDefaultLibrarySearchSupported()
Determines if the underlying platform/runtime supports the notion of a default library search
path.
|
NativeLibraryHandle getLibraryHandle(String libPath)
libPath - the absolute path to the libraryUnsatisfiedLinkError - if the library could not be found or openedboolean isDefaultLibrarySearchSupported()
LD_LIBRARY_PATH
environment variable.NativeFunctionPointer getFunctionPointer(NativeLibraryHandle[] libraries, String name)
NativeFunctionPointer of a native function.libraries - the ordered list of libraries to search for the functionname - the name of the function to be resolvednull if the function pointer could
not be resolvedNativeFunctionHandle getFunctionHandle(NativeLibraryHandle library, String name, Class<?> returnType, Class<?>... argumentTypes)
library - the handle to a resolved libraryname - the name of the function to be resolvedreturnType - the type of the return valueargumentTypes - the types of the argumentsnull if the function
handle could not be resolvedNativeFunctionHandle getFunctionHandle(NativeFunctionPointer functionPointer, Class<?> returnType, Class<?>... argumentTypes)
functionPointer - a function pointerreturnType - the type of the return valueargumentTypes - the types of the argumentsnull if the function
handle could not be resolvedNativeFunctionHandle getFunctionHandle(NativeLibraryHandle[] libraries, String name, Class<?> returnType, Class<?>... argumentTypes)
libraries - the ordered list of libraries to search for the functionname - the name of the function to be resolvedreturnType - the type of the return valueargumentTypes - the types of the argumentsnull if the function
handle could not be resolvedNativeFunctionHandle getFunctionHandle(String name, Class<?> returnType, Class<?>... argumentTypes)
name - the name of the function to be resolvedreturnType - the type of the return valueargumentTypes - the types of the argumentsnull if default library
searching is not supported or if the
function could not be resolvedNativeFunctionPointer getNativeFunctionPointerFromRawValue(long rawValue)
NativeFunctionPointer from a raw value.rawValue - raw function pointerNativeFunctionPointer for rawValue