Closure.Buffer interface to read/write
parameter and return value data in native memory
| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | DirectClosureBuffer.
Reads annd writes data types that are smaller than the size of a native long, as a native long for compatibility with FFI. |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final CallContext | |
| private static final MemoryIO | |
| private static final long | |
| private final long | |
| private final long | |
| private static final DirectClosureBuffer. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final long | getAddress(int
The parameter index index)Implements com. |
| public final byte | getByte(int
The parameter index index)Implements com. |
| public final double | getDouble(int
The parameter index index)Implements com. |
| public final float | getFloat(int
The parameter index index)Implements com. |
| public final int | getInt(int
The parameter index index)Implements com. |
| public final long | getLong(int
The parameter index index)Implements com. |
| public final short | getShort(int
The parameter index index)Implements com. |
| public final long | getStruct(int
The parameter index index)Implements com. |
| public final void | setAddressReturn(long
The native pointer value to return from the closure. address)Implements com. |
| public final void | setByteReturn(byte
The 8 bit integer value to return from the closure. value)Implements com. |
| public final void | setDoubleReturn(double
The 64 bit floating point value to return from the closure. value)Implements com. |
| public final void | setFloatReturn(float
The 32 bit floating point value to return from the closure. value)Implements com. |
| public final void | setIntReturn(int
The 32 bit integer value to return from the closure. value)Implements com. |
| public final void | setLongReturn(long
The 64 bit integer value to return from the closure. value)Implements com. |
| public final void | setShortReturn(short
The 16 bit integer value to return from the closure. value)Implements com. |
| public void | setStructReturn(long
The address of a native struct to return as a struct value from the closure. value)Implements com. |
| public void | setStructReturn(byte[]
Struct data packed into a byte array to return as a struct value from the closure. data, int the offset within the byte array to start copying data offset)Implements com. |
| callContext | back to summary |
|---|---|
| private final CallContext callContext | |
| IO | back to summary |
|---|---|
| private static final MemoryIO IO | |
| PARAM_SIZE | back to summary |
|---|---|
| private static final long PARAM_SIZE | |
| parameters | back to summary |
|---|---|
| private final long parameters | |
| retval | back to summary |
|---|---|
| private final long retval | |
| WordIO | back to summary |
|---|---|
| private static final DirectClosureBuffer. | |
| DirectClosureBuffer | back to summary |
|---|---|
| public DirectClosureBuffer(CallContext callContext, long retval, long parameters) | |
| getAddress | back to summary |
|---|---|
| public final long getAddress(int index) Implements com. Doc from com. Gets the value of a native pointer parameter.
| |
| getByte | back to summary |
|---|---|
| public final byte getByte(int index) Implements com. Doc from com. Gets the value of an 8 bit integer parameter.
| |
| getDouble | back to summary |
|---|---|
| public final double getDouble(int index) Implements com. Doc from com. Gets the value of a 64 bit floating point parameter.
| |
| getFloat | back to summary |
|---|---|
| public final float getFloat(int index) Implements com. Doc from com. Gets the value of a 32 bit floating point parameter.
| |
| getInt | back to summary |
|---|---|
| public final int getInt(int index) Implements com. Doc from com. Gets the value of a 32 bit integer parameter.
| |
| getLong | back to summary |
|---|---|
| public final long getLong(int index) Implements com. Doc from com. Gets the value of a 64 bit integer parameter.
| |
| getShort | back to summary |
|---|---|
| public final short getShort(int index) Implements com. Doc from com. Gets the value of a 16 bit integer parameter.
| |
| getStruct | back to summary |
|---|---|
| public final long getStruct(int index) Implements com. Doc from com. Gets the address of a struct parameter that is passed by value.
| |
| setAddressReturn | back to summary |
|---|---|
| public final void setAddressReturn(long address) Implements com. Doc from com. Sets the closure return value to a native pointer value.
| |
| setByteReturn | back to summary |
|---|---|
| public final void setByteReturn(byte value) Implements com. Doc from com. Sets the closure return value to an 8 bit integer value.
| |
| setDoubleReturn | back to summary |
|---|---|
| public final void setDoubleReturn(double value) Implements com. Doc from com. Sets the closure return value to a 64 bit floating point value.
| |
| setFloatReturn | back to summary |
|---|---|
| public final void setFloatReturn(float value) Implements com. Doc from com. Sets the closure return value to a 32 bit floating point value.
| |
| setIntReturn | back to summary |
|---|---|
| public final void setIntReturn(int value) Implements com. Doc from com. Sets the closure return value to a 32 bit integer value.
| |
| setLongReturn | back to summary |
|---|---|
| public final void setLongReturn(long value) Implements com. Doc from com. Sets the closure return value to a 64 bit integer value.
| |
| setShortReturn | back to summary |
|---|---|
| public final void setShortReturn(short value) Implements com. Doc from com. Sets the closure return value to a 16 bit integer value.
| |
| setStructReturn | back to summary |
|---|---|
| public void setStructReturn(long value) Implements com. Doc from com. Sets the closure return value to the contents of a struct
| |
| setStructReturn | back to summary |
|---|---|
| public void setStructReturn(byte[] data, int offset) Implements com. Doc from com. Sets the closure return value to the contents of a struct
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract int | Returns: An integerThe memory address to read the value from address)Reads a native long argument from native memory. |
| public static final DirectClosureBuffer. | |
| pack-priv abstract void | put(long
The address to write the value at address, int The value to write. value)Writes a native long argument to native memory. |
| NativeWordIO | back to summary |
|---|---|
| private NativeWordIO() | |
| get | back to summary |
|---|---|
| pack-priv abstract int get(long address) Reads a native long argument from native memory.
| |
| getInstance | back to summary |
|---|---|
| public static final DirectClosureBuffer. | |
| put | back to summary |
|---|---|
| pack-priv abstract void put(long address, int value) Writes a native long argument to native memory.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final DirectClosureBuffer. | |
| private static final MemoryIO |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | get(long
The memory address to read the value from address)Implements abstract com. |
| pack-priv void | put(long
The address to write the value at address, int The value to write. value)Implements abstract com. |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final DirectClosureBuffer. | |
| IO | back to summary |
|---|---|
| private static final MemoryIO IO | |
| NativeWordIO32 | back to summary |
|---|---|
| private NativeWordIO32() | |
| get | back to summary |
|---|---|
| pack-priv int get(long address) Implements abstract com. Doc from com. Reads a native long argument from native memory.
| |
| put | back to summary |
|---|---|
| pack-priv void put(long address, int value) Implements abstract com. Doc from com. Writes a native long argument to native memory.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final DirectClosureBuffer. | |
| private static final MemoryIO |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | get(long
The memory address to read the value from address)Implements abstract com. |
| pack-priv void | put(long
The address to write the value at address, int The value to write. value)Implements abstract com. |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final DirectClosureBuffer. | |
| IO | back to summary |
|---|---|
| private static final MemoryIO IO | |
| NativeWordIO64 | back to summary |
|---|---|
| private NativeWordIO64() | |
| get | back to summary |
|---|---|
| pack-priv int get(long address) Implements abstract com. Doc from com. Reads a native long argument from native memory.
| |
| put | back to summary |
|---|---|
| pack-priv void put(long address, int value) Implements abstract com. Doc from com. Writes a native long argument to native memory.
| |