Function represents a pointer to some native function.
invoke(Class, Object[], Map) is the primary means to call
the function.
Pointer
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALT_CONVENTION
First alternate convention (currently used only for w32 stdcall). |
| public static final int | C_CONVENTION
Standard C calling convention. |
| private int | |
| private String | |
| private NativeLibrary | |
| public static final int | MAX_NARGS
Maximum number of arguments supported by a JNA function call. |
| pack-priv static final String | OPTION_INVOKING_METHOD
For internal JNA use. |
| Access | Constructor and Description |
|---|---|
| pack-priv | Function(NativeLibrary
NativeLibrary in which to find the functionName of the native function to be linked with functionName, int Calling convention used by the native function callingConvention)Create a new |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| pack-priv static Object[] | concatenateVarArgs(Object[] inArgs)
Concatenate varargs with normal args to obtain a simple argument array. |
| private Object | |
| public boolean | equals(Object
A o)Pointer instanceOverrides com. |
| public int | |
| public static Function | getFunction(String
Library in which to find the native function libraryName, String Name of the native function to be linked with functionName)Obtain a |
| public static Function | getFunction(String
Library in which to find the function libraryName, String Name of the native function to be linked with functionName, int Call convention used by the native function callConvention)Obtain a |
| public String | |
| public Object | |
| public Object | |
| pack-priv Object | |
| public void | |
| private native double | Returns: The value returned by the target native functioncalling convention to be used callingConvention, Object[] Arguments to pass to the native function args)Call the native function being represented by this object |
| public double | |
| private native float | Returns: The value returned by the target native functioncalling convention to be used callingConvention, Object[] Arguments to pass to the native function args)Call the native function being represented by this object |
| public float | |
| private native int | |
| public int | |
| private native long | Returns: The value returned by the target native functioncalling convention to be used callingConvention, Object[] Arguments to pass to the native function args)Call the native function being represented by this object |
| public long | |
| private native Pointer | Returns: The native pointer returned by the target native functioncalling convention to be used callingConvention, Object[] Arguments to pass to the native function args)Call the native function being represented by this object |
| public Pointer | |
| private String | Returns: The value returned by the target native function, as a Stringcalling convention to be used callingConvention, Object[] Arguments to pass to the native function args, boolean whether the native string uses wide)wchar_t;
if false, char is assumedCall the native function being represented by this object |
| public String | invokeString(Object[]
Arguments passed to native function args, boolean Whether the return value is of type wide)wchar_t*;
if false, the return value is of type char*.Convenience method for
|
| private native Structure | Returns: The native pointer returned by the target native functioncalling convention to be used callingConvention, Object[] Arguments to pass to the native function args, Structure Pre-allocated structure to hold the result result)Call the native function being represented by this object |
| private native void | invokeVoid(int
calling convention to be used callingConvention, Object[] Arguments to pass to the native function args)Call the native function being represented by this object |
| public void | |
| private boolean | |
| pack-priv static boolean | |
| public String | toString()
Overrides com. |
| ALT_CONVENTION | back to summary |
|---|---|
| public static final int ALT_CONVENTION First alternate convention (currently used only for w32 stdcall). | |
| C_CONVENTION | back to summary |
|---|---|
| public static final int C_CONVENTION Standard C calling convention. | |
| callingConvention | back to summary |
|---|---|
| private int callingConvention | |
| functionName | back to summary |
|---|---|
| private String functionName | |
| library | back to summary |
|---|---|
| private NativeLibrary library | |
| MAX_NARGS | back to summary |
|---|---|
| public static final int MAX_NARGS Maximum number of arguments supported by a JNA function call. | |
| OPTION_INVOKING_METHOD | back to summary |
|---|---|
| pack-priv static final String OPTION_INVOKING_METHOD For internal JNA use. | |
| Function | back to summary |
|---|---|
| pack-priv Function(NativeLibrary library, String functionName, int callingConvention) Create a new The allocated instance represents a pointer to the named native function from the supplied library, called with the given calling convention.
| |
| Function | back to summary |
|---|---|
| pack-priv Function(Pointer functionAddress, int callingConvention) Create a new The allocated instance represents a pointer to the given function address, called with the given calling convention.
| |
| checkCallingConvention | back to summary |
|---|---|
| private void checkCallingConvention(int convention) throws IllegalArgumentException | |
| concatenateVarArgs | back to summary |
|---|---|
| pack-priv static Object[] concatenateVarArgs(Object[] inArgs) Concatenate varargs with normal args to obtain a simple argument array. | |
| convertArgument | back to summary |
|---|---|
| private Object convertArgument(Object[] args, int index, Method invokingMethod, TypeMapper mapper) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides com. Two function pointers are equal if they share the same peer address and calling convention.
| |
| getCallingConvention | back to summary |
|---|---|
| public int getCallingConvention() | |
| getFunction | back to summary |
|---|---|
| public static Function getFunction(String libraryName, String functionName) Obtain a The allocated instance represents a pointer to the named native function from the named library, called with the standard "C" calling convention.
| |
| getFunction | back to summary |
|---|---|
| public static Function getFunction(String libraryName, String functionName, int callConvention) Obtain a The allocated instance represents a pointer to the named native function from the named library, called with the named calling convention.
| |
| getName | back to summary |
|---|---|
| public String getName() | |
| invoke | back to summary |
|---|---|
| public Object invoke(Class<T> returnType, Object[] inArgs) Invoke the native function with the given arguments, returning the native result as an Object. | |
| invoke | back to summary |
|---|---|
| public Object invoke(Class<T> returnType, Object[] inArgs, Map<K, V> options) Invoke the native function with the given arguments, returning the native result as an Object. | |
| invoke | back to summary |
|---|---|
pack-priv Object invoke(Object[] args, Class<T> returnType)
| |
| invoke | back to summary |
|---|---|
| public void invoke(Object[] args) Call the native function being represented by this object
| |
| invokeDouble | back to summary |
|---|---|
| private native double invokeDouble(int callingConvention, Object[] args) Call the native function being represented by this object
| |
| invokeDouble | back to summary |
|---|---|
| public double invokeDouble(Object[] args) Convenience method for
| |
| invokeFloat | back to summary |
|---|---|
| private native float invokeFloat(int callingConvention, Object[] args) Call the native function being represented by this object
| |
| invokeFloat | back to summary |
|---|---|
| public float invokeFloat(Object[] args) Convenience method for
| |
| invokeInt | back to summary |
|---|---|
| private native int invokeInt(int callingConvention, Object[] args) Call the native function being represented by this object
| |
| invokeInt | back to summary |
|---|---|
| public int invokeInt(Object[] args) Convenience method for
| |
| invokeLong | back to summary |
|---|---|
| private native long invokeLong(int callingConvention, Object[] args) Call the native function being represented by this object
| |
| invokeLong | back to summary |
|---|---|
| public long invokeLong(Object[] args) Convenience method for
| |
| invokePointer | back to summary |
|---|---|
| private native Pointer invokePointer(int callingConvention, Object[] args) Call the native function being represented by this object | |
| invokePointer | back to summary |
|---|---|
| public Pointer invokePointer(Object[] args) Convenience method for
| |
| invokeString | back to summary |
|---|---|
| private String invokeString(int callingConvention, Object[] args, boolean wide) Call the native function being represented by this object | |
| invokeString | back to summary |
|---|---|
| public String invokeString(Object[] args, boolean wide) Convenience method for
| |
| invokeStructure | back to summary |
|---|---|
| private native Structure invokeStructure(int callingConvention, Object[] args, Structure result) Call the native function being represented by this object | |
| invokeVoid | back to summary |
|---|---|
| private native void invokeVoid(int callingConvention, Object[] args) Call the native function being represented by this object
| |
| invokeVoid | back to summary |
|---|---|
| public void invokeVoid(Object[] args) Convenience method for
| |
| isPrimitiveArray | back to summary |
|---|---|
| private boolean isPrimitiveArray(Class<T> argClass) | |
| isVarArgs | back to summary |
|---|---|
| pack-priv static boolean isVarArgs(Method m) Varargs are only supported on 1.5+. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Provide a human-readable representation of this object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private Pointer[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| original | back to summary |
|---|---|
| private Pointer[] original | |
| PointerArray | back to summary |
|---|---|
| public PointerArray(Pointer[] arg) | |
| read | back to summary |
|---|---|
| public void read() | |