public final class FFIUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static com.kenai.jffi.MemoryIO |
IO |
private static java.util.Map<NativeType,com.kenai.jffi.Type> |
typeMap |
| Modifier | Constructor and Description |
|---|---|
private |
FFIUtil() |
| Modifier and Type | Method and Description |
|---|---|
private static java.util.Map<NativeType,com.kenai.jffi.Type> |
buildTypeMap() |
private static com.kenai.jffi.Type |
cacheFFIType(Type type) |
(package private) static com.kenai.jffi.Type |
getFFIType(NativeType type) |
(package private) static com.kenai.jffi.Type |
getFFIType(Type type) |
(package private) static IRubyObject |
getString(Ruby runtime,
long address)
Reads a nul-terminated string from native memory and boxes it up in a ruby
string.
|
(package private) static com.kenai.jffi.Array |
newArray(Type.Array arrayType)
Creates a new JFFI type descriptor for an array
|
(package private) static com.kenai.jffi.Aggregate |
newStruct(StructLayout layout)
Creates a new JFFI Struct descriptor for a StructLayout
|
private static final com.kenai.jffi.MemoryIO IO
private static final java.util.Map<NativeType,com.kenai.jffi.Type> typeMap
private static final java.util.Map<NativeType,com.kenai.jffi.Type> buildTypeMap()
static final com.kenai.jffi.Type getFFIType(Type type)
private static com.kenai.jffi.Type cacheFFIType(Type type)
static final com.kenai.jffi.Type getFFIType(NativeType type)
static final com.kenai.jffi.Aggregate newStruct(StructLayout layout)
layout - The structure layoutstatic com.kenai.jffi.Array newArray(Type.Array arrayType)
arrayType - The structure layoutstatic final IRubyObject getString(Ruby runtime, long address)
runtime - The ruby runtime for the resulting string.address - The memory address to read the string from.