Package com.kenai.jffi
Class HeapObjectParameterInvoker
- java.lang.Object
-
- com.kenai.jffi.ObjectParameterInvoker
-
- com.kenai.jffi.HeapObjectParameterInvoker
-
final class HeapObjectParameterInvoker extends ObjectParameterInvoker
-
-
Constructor Summary
Constructors Constructor Description HeapObjectParameterInvoker(Foreign foreign)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intencode(HeapInvocationBuffer.Encoder encoder, byte[] paramBuffer, int off, Type type, long n)private static byte[]encodeN3(Function function, long n1, long n2, long n3)private static byte[]encodeN4(Function function, long n1, long n2, long n3, long n4)private static byte[]encodeN5(Function function, long n1, long n2, long n3, long n4, long n5)private static byte[]encodeN6(Function function, long n1, long n2, long n3, long n4, long n5, long n6)longinvokeN1O1rN(Function function, long n1, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)Invokes a function with one numeric argument (which may be a pointer), and returns a numeric value.longinvokeN2O1rN(Function function, long n1, long n2, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)Invokes a function with two numeric arguments, and returns a numeric value.longinvokeN2O2rN(Function function, long n1, long n2, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)Invokes a function with two numeric arguments, and returns a numeric value.longinvokeN3O1rN(Function function, long n1, long n2, long n3, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)Invokes a function with two numeric arguments, and returns a numeric value.longinvokeN3O2rN(Function function, long n1, long n2, long n3, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)longinvokeN3O3rN(Function function, long n1, long n2, long n3, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)longinvokeN4O1rN(Function function, long n1, long n2, long n3, long n4, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)longinvokeN4O2rN(Function function, long n1, long n2, long n3, long n4, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)longinvokeN4O3rN(Function function, long n1, long n2, long n3, long n4, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)longinvokeN5O1rN(Function function, long n1, long n2, long n3, long n4, long n5, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)longinvokeN5O2rN(Function function, long n1, long n2, long n3, long n4, long n5, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)longinvokeN5O3rN(Function function, long n1, long n2, long n3, long n4, long n5, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)longinvokeN6O1rN(Function function, long n1, long n2, long n3, long n4, long n5, long n6, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)longinvokeN6O2rN(Function function, long n1, long n2, long n3, long n4, long n5, long n6, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)longinvokeN6O3rN(Function function, long n1, long n2, long n3, long n4, long n5, long n6, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)private longinvokeO1(Function function, byte[] paramBuffer, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)private longinvokeO2(Function function, byte[] paramBuffer, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)private longinvokeO3(Function function, byte[] paramBuffer, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)booleanisNative()-
Methods inherited from class com.kenai.jffi.ObjectParameterInvoker
getInstance, newHeapInvoker, newNativeInvoker
-
-
-
-
Field Detail
-
foreign
private final Foreign foreign
-
-
Constructor Detail
-
HeapObjectParameterInvoker
HeapObjectParameterInvoker(Foreign foreign)
-
-
Method Detail
-
isNative
public final boolean isNative()
- Specified by:
isNativein classObjectParameterInvoker
-
encode
private static int encode(HeapInvocationBuffer.Encoder encoder, byte[] paramBuffer, int off, Type type, long n)
-
invokeO1
private long invokeO1(Function function, byte[] paramBuffer, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
-
invokeO2
private long invokeO2(Function function, byte[] paramBuffer, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)
-
invokeO3
private long invokeO3(Function function, byte[] paramBuffer, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)
-
invokeN1O1rN
public long invokeN1O1rN(Function function, long n1, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
Description copied from class:ObjectParameterInvokerInvokes a function with one numeric argument (which may be a pointer), and returns a numeric value.- Specified by:
invokeN1O1rNin classObjectParameterInvoker- Parameters:
function- TheFunctionto invoke.n1- numeric argument.o1- array or buffer, to be passed as a pointer for the first numeric parameter.o1off- offset from the start of the array or buffer.o1len- length of the array to use.o1flags- object flags (type, direction, parameter index).
-
invokeN2O1rN
public long invokeN2O1rN(Function function, long n1, long n2, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
Description copied from class:ObjectParameterInvokerInvokes a function with two numeric arguments, and returns a numeric value.- Specified by:
invokeN2O1rNin classObjectParameterInvoker- Parameters:
function- TheFunctionto invoke.n1- first numeric argument.n2- The second numeric argument.o1- An Object (array or buffer), to be passed as a pointer.o1off- offset from the start of the array or buffer.o1len- length of the array to use.o1flags- object flags (type, direction, parameter index).
-
invokeN2O2rN
public long invokeN2O2rN(Function function, long n1, long n2, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)
Description copied from class:ObjectParameterInvokerInvokes a function with two numeric arguments, and returns a numeric value.- Specified by:
invokeN2O2rNin classObjectParameterInvoker- Parameters:
function- TheFunctionto invoke.n1- first numeric argument.n2- The second numeric argument.o1- An Object (array or buffer), to be passed as a pointer.o1off- offset from the start of the array or buffer.o1len- length of the array to use.o1flags- object flags (type, direction, parameter index).o2- An Object (array or buffer), to be passed as a pointer.o2off- The offset from the start of the array or buffer.o2len- The length of the array to use.o2flags- Object flags (direction, type, idx).
-
encodeN3
private static byte[] encodeN3(Function function, long n1, long n2, long n3)
-
invokeN3O1rN
public long invokeN3O1rN(Function function, long n1, long n2, long n3, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
Description copied from class:ObjectParameterInvokerInvokes a function with two numeric arguments, and returns a numeric value.- Specified by:
invokeN3O1rNin classObjectParameterInvoker- Parameters:
function- TheFunctionto invoke.n1- first numeric argument.n2- The second numeric argument.n3- The second numeric argument.o1- An Object (array or buffer), to be passed as a pointer.o1off- offset from the start of the array or buffer.o1len- length of the array to use.o1flags- object flags (type, direction, parameter index).
-
invokeN3O2rN
public long invokeN3O2rN(Function function, long n1, long n2, long n3, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)
- Specified by:
invokeN3O2rNin classObjectParameterInvoker
-
invokeN3O3rN
public long invokeN3O3rN(Function function, long n1, long n2, long n3, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)
- Specified by:
invokeN3O3rNin classObjectParameterInvoker
-
encodeN4
private static byte[] encodeN4(Function function, long n1, long n2, long n3, long n4)
-
invokeN4O1rN
public long invokeN4O1rN(Function function, long n1, long n2, long n3, long n4, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
- Specified by:
invokeN4O1rNin classObjectParameterInvoker
-
invokeN4O2rN
public long invokeN4O2rN(Function function, long n1, long n2, long n3, long n4, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)
- Specified by:
invokeN4O2rNin classObjectParameterInvoker
-
invokeN4O3rN
public long invokeN4O3rN(Function function, long n1, long n2, long n3, long n4, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)
- Specified by:
invokeN4O3rNin classObjectParameterInvoker
-
encodeN5
private static byte[] encodeN5(Function function, long n1, long n2, long n3, long n4, long n5)
-
invokeN5O1rN
public long invokeN5O1rN(Function function, long n1, long n2, long n3, long n4, long n5, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
- Specified by:
invokeN5O1rNin classObjectParameterInvoker
-
invokeN5O2rN
public long invokeN5O2rN(Function function, long n1, long n2, long n3, long n4, long n5, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)
- Specified by:
invokeN5O2rNin classObjectParameterInvoker
-
invokeN5O3rN
public long invokeN5O3rN(Function function, long n1, long n2, long n3, long n4, long n5, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)
- Specified by:
invokeN5O3rNin classObjectParameterInvoker
-
encodeN6
private static byte[] encodeN6(Function function, long n1, long n2, long n3, long n4, long n5, long n6)
-
invokeN6O1rN
public long invokeN6O1rN(Function function, long n1, long n2, long n3, long n4, long n5, long n6, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags)
- Specified by:
invokeN6O1rNin classObjectParameterInvoker
-
invokeN6O2rN
public long invokeN6O2rN(Function function, long n1, long n2, long n3, long n4, long n5, long n6, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags)
- Specified by:
invokeN6O2rNin classObjectParameterInvoker
-
invokeN6O3rN
public long invokeN6O3rN(Function function, long n1, long n2, long n3, long n4, long n5, long n6, java.lang.Object o1, int o1off, int o1len, ObjectParameterInfo o1flags, java.lang.Object o2, int o2off, int o2len, ObjectParameterInfo o2flags, java.lang.Object o3, int o3off, int o3len, ObjectParameterInfo o3flags)
- Specified by:
invokeN6O3rNin classObjectParameterInvoker
-
-