Package | Description |
---|---|
jnr.ffi | |
jnr.ffi.byref | |
jnr.ffi.mapper | |
jnr.ffi.provider | |
jnr.ffi.provider.converters | |
jnr.ffi.provider.jffi |
Modifier and Type | Field and Description |
---|---|
private Runtime |
StructLayout.runtime |
private Runtime |
Pointer.runtime |
private Runtime |
Struct.Info.runtime |
static Runtime |
Runtime.SingletonHolder.SYSTEM_RUNTIME |
Modifier and Type | Method and Description |
---|---|
Runtime |
StructLayout.getRuntime() |
Runtime |
Pointer.getRuntime()
Gets the
Runtime this Pointer instance belongs to. |
Runtime |
Struct.getRuntime() |
static Runtime |
Runtime.getRuntime(java.lang.Object library)
Returns the runtime associated with the library instance.
|
static Runtime |
Library.getRuntime(java.lang.Object library)
Deprecated.
|
static Runtime |
Runtime.getSystemRuntime()
Gets the global Runtime for the current FFI provider
|
Modifier and Type | Method and Description |
---|---|
static Pointer |
Memory.allocate(Runtime runtime,
int size)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocate(Runtime runtime,
NativeType type)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocate(Runtime runtime,
Type type)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocate(Runtime runtime,
TypeAlias type)
Allocates a new block of java memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
int size)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
int size,
boolean clear)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
NativeType type)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateDirect(Runtime runtime,
TypeAlias type)
Allocates a new block of native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateTemporary(Runtime runtime,
NativeType type)
Allocates a new block of transient native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateTemporary(Runtime runtime,
NativeType type,
boolean clear)
Allocates a new block of transient native memory and wraps it in a
Pointer
accessor. |
static Pointer |
Memory.allocateTemporary(Runtime runtime,
TypeAlias type)
Allocates a new block of transient native memory and wraps it in a
Pointer
accessor. |
static <T extends Struct> |
Struct.arrayOf(Runtime runtime,
java.lang.Class<T> type,
int length) |
static int |
LastError.getLastError(Runtime runtime)
Gets the value of errno from the last native call.
|
abstract boolean |
Runtime.isCompatible(Runtime other)
Indicates whether this Runtime instance is compatible with another Runtime instance.
|
static <T> ObjectReferenceManager<T> |
ObjectReferenceManager.newInstance(Runtime runtime) |
static Pointer |
Pointer.newIntPointer(Runtime runtime,
long address)
Wraps an integer value in an opaque
Pointer instance. |
static void |
LastError.setLastError(Runtime runtime,
int error)
Sets the native errno value.
|
static Pointer |
Pointer.wrap(Runtime runtime,
java.nio.ByteBuffer buffer)
Wraps an existing ByteBuffer in a
Pointer implementation so it can
be used as a parameter to native functions. |
static Pointer |
Pointer.wrap(Runtime runtime,
long address)
Wraps a native address in a
Pointer instance. |
static Pointer |
Pointer.wrap(Runtime runtime,
long address,
long size)
Wraps a native address in a
Pointer instance. |
Constructor and Description |
---|
Info(Runtime runtime) |
Pointer(Runtime runtime,
long address,
boolean direct) |
Struct(Runtime runtime)
Creates a new
Struct . |
Struct(Runtime runtime,
boolean isUnion)
Creates a new Struct.
|
Struct(Runtime runtime,
Struct.Alignment alignment) |
Struct(Runtime runtime,
Struct enclosing) |
StructLayout(Runtime runtime)
Creates a new StructLayout.
|
StructLayout(Runtime runtime,
int structSize) |
Union(Runtime runtime) |
Modifier and Type | Method and Description |
---|---|
void |
LongLongByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the value from native memory
|
void |
AddressByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the address value from native memory
|
void |
FloatByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the float value from native memory
|
void |
DoubleByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the double value from native memory
|
void |
PointerByReference.fromNative(Runtime runtime,
Pointer memory,
long offset) |
void |
ByteByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the Byte value from native memory
|
void |
ByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the java value from native memory
|
void |
NumberByReference.fromNative(Runtime runtime,
Pointer memory,
long offset) |
void |
ShortByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the short value from native memory
|
void |
IntByReference.fromNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the integer value from native memory
|
void |
NativeLongByReference.fromNative(Runtime runtime,
Pointer memory,
long offset)
Copies the long value from native memory
|
int |
LongLongByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
int |
AddressByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference
|
int |
FloatByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
int |
DoubleByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
int |
PointerByReference.nativeSize(Runtime runtime) |
int |
ByteByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
int |
ByReference.nativeSize(Runtime runtime)
Gets the size of the native buffer required to store the value
|
int |
NumberByReference.nativeSize(Runtime runtime) |
int |
ShortByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
int |
IntByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference
|
int |
NativeLongByReference.nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
void |
LongLongByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the value to native memory
|
void |
AddressByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the address value to native memory
|
void |
FloatByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the float value to native memory
|
void |
DoubleByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the double value to native memory
|
void |
PointerByReference.toNative(Runtime runtime,
Pointer memory,
long offset) |
void |
ByteByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the Byte value to native memory
|
void |
ByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the java value to native memory
|
void |
NumberByReference.toNative(Runtime runtime,
Pointer memory,
long offset) |
void |
ShortByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the short value to native memory
|
void |
IntByReference.toNative(Runtime runtime,
Pointer buffer,
long offset)
Copies the integer value to native memory
|
void |
NativeLongByReference.toNative(Runtime runtime,
Pointer memory,
long offset)
Copies the long value to native memory
|
Modifier and Type | Field and Description |
---|---|
private Runtime |
MethodParameterContext.runtime |
private Runtime |
MethodResultContext.runtime |
Modifier and Type | Method and Description |
---|---|
Runtime |
MethodParameterContext.getRuntime() |
Runtime |
ToNativeContext.getRuntime()
Gets the Runtime used for the conversion.
|
Runtime |
FromNativeContext.getRuntime()
Gets the Runtime used for the conversion.
|
Runtime |
MethodResultContext.getRuntime() |
Constructor and Description |
---|
MethodParameterContext(Runtime runtime,
java.lang.reflect.Method method,
int parameterIndex) |
MethodParameterContext(Runtime runtime,
java.lang.reflect.Method method,
int parameterIndex,
java.lang.annotation.Annotation[] annotationArray) |
MethodParameterContext(Runtime runtime,
java.lang.reflect.Method method,
int parameterIndex,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
MethodResultContext(Runtime runtime,
java.lang.reflect.Method method) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractRuntime |
(package private) class |
InvalidRuntime
A
Runtime subclass that throws exceptions for all methods |
Modifier and Type | Field and Description |
---|---|
private Runtime |
InvalidProvider.runtime |
private Runtime |
DefaultObjectReferenceManager.runtime |
Modifier and Type | Method and Description |
---|---|
abstract Runtime |
FFIProvider.getRuntime()
Gets the default Runtime for this provider.
|
Runtime |
InvalidProvider.getRuntime() |
Runtime |
LoadedLibrary.getRuntime() |
Modifier and Type | Method and Description |
---|---|
static AbstractArrayMemoryIO.ArrayIO |
AbstractArrayMemoryIO.ArrayIO.getArrayIO(Runtime runtime) |
boolean |
InvalidRuntime.isCompatible(Runtime other) |
Constructor and Description |
---|
AbstractArrayMemoryIO(Runtime runtime,
byte[] buffer) |
AbstractArrayMemoryIO(Runtime runtime,
byte[] buffer,
int offset,
int length) |
AbstractArrayMemoryIO(Runtime runtime,
int size) |
AbstractBufferMemoryIO(Runtime runtime,
java.nio.ByteBuffer buffer,
long address) |
AbstractMemoryIO(Runtime runtime,
long address,
boolean isDirect) |
DefaultObjectReferenceManager(Runtime runtime) |
InAccessibleMemoryIO(Runtime runtime,
long address,
boolean isDirect) |
IntPointer(Runtime runtime,
int address) |
IntPointer(Runtime runtime,
long address) |
NullMemoryIO(Runtime runtime) |
ObjectReference(Runtime runtime,
long address,
java.lang.Object referent) |
Modifier and Type | Field and Description |
---|---|
protected Runtime |
Pointer64ArrayParameterConverter.runtime |
protected Runtime |
Pointer32ArrayParameterConverter.runtime |
protected Runtime |
StructArrayParameterConverter.runtime |
private Runtime |
CharSequenceArrayParameterConverter.runtime |
Modifier and Type | Method and Description |
---|---|
(package private) static CharSequenceArrayParameterConverter.StringArray |
CharSequenceArrayParameterConverter.StringArray.allocate(Runtime runtime,
int capacity) |
Constructor and Description |
---|
CharSequenceArrayParameterConverter(Runtime runtime,
int parameterFlags) |
Out(Runtime runtime,
java.lang.Class<? extends Struct> structClass,
int parameterFlags) |
Out(Runtime runtime,
int parameterFlags) |
Out(Runtime runtime,
int parameterFlags) |
Out(Runtime runtime,
int parameterFlags) |
Pointer32ArrayParameterConverter(Runtime runtime,
int parameterFlags) |
Pointer64ArrayParameterConverter(Runtime runtime,
int parameterFlags) |
StringArray(Runtime runtime,
Pointer memory,
int capacity) |
StructArrayParameterConverter(Runtime runtime,
int parameterFlags) |
Modifier and Type | Class and Description |
---|---|
class |
NativeRuntime |
Modifier and Type | Field and Description |
---|---|
private Runtime |
AsmStructByReferenceFromNativeConverter.runtime |
private Runtime |
ReflectionLibraryLoader.GetRuntimeInvoker.runtime |
private Runtime |
ReflectionLibraryLoader.LazyLoader.runtime |
private Runtime |
NativeClosureManager.runtime |
private Runtime |
AbstractX86StubCompiler.runtime |
protected Runtime |
NativeClosureProxy.runtime |
private Runtime |
NativeClosureProxy.Factory.runtime |
private Runtime |
DefaultInvokerFactory.runtime |
private Runtime |
DefaultInvokerFactory.VariadicInvoker.runtime |
protected Runtime |
DefaultInvokerFactory.DefaultInvoker.runtime |
private Runtime |
SimpleNativeContext.runtime |
private Runtime |
ClosureFromNativeConverter.ProxyConverter.runtime |
private Runtime |
NativeMemoryManager.runtime |
protected Runtime |
AbstractAsmLibraryInterface.runtime |
private Runtime |
NativeClosureFactory.runtime |
private Runtime |
AsmBuilder.runtime |
private Runtime |
VariableAccessorGenerator.runtime |
Modifier and Type | Method and Description |
---|---|
protected Runtime |
AsmStructByReferenceFromNativeConverter.getRuntime() |
Runtime |
AbstractX86StubCompiler.getRuntime() |
Runtime |
SimpleNativeContext.getRuntime() |
Runtime |
AbstractAsmLibraryInterface.getRuntime() |
Runtime |
Provider.getRuntime() |
Runtime |
AsmBuilder.getRuntime() |
Modifier and Type | Method and Description |
---|---|
static DirectMemoryIO |
TransientNativeMemory.allocate(Runtime runtime,
int size,
int align,
boolean clear) |
(package private) Variable |
VariableAccessorGenerator.buildVariableAccessor(Runtime runtime,
long address,
java.lang.Class interfaceClass,
java.lang.Class javaType,
java.util.Collection<java.lang.annotation.Annotation> annotations,
ToNativeConverter toNativeConverter,
FromNativeConverter fromNativeConverter,
AsmClassLoader classLoader) |
private FromNativeConverter<? extends Struct,Pointer> |
StructByReferenceResultConverterFactory.createConverter(Runtime runtime,
java.lang.Class<? extends Struct> structClass,
FromNativeContext fromNativeContext) |
(package private) static Variable |
ReflectionVariableAccessorGenerator.createVariableAccessor(Runtime runtime,
java.lang.reflect.Method method,
long symbolAddress,
SignatureTypeMapper typeMapper,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
private static void |
ClosureFromNativeConverter.generateInvocation(Runtime runtime,
AsmBuilder builder,
java.lang.Class closureClass,
SignatureTypeMapper typeMapper) |
static FromNativeConverter<?,Pointer> |
ClosureFromNativeConverter.getInstance(Runtime runtime,
SignatureType type,
AsmClassLoader classLoader,
SignatureTypeMapper typeMapper) |
(package private) static NativeType |
InvokerUtil.getMethodParameterNativeType(Runtime runtime,
java.lang.Class parameterClass,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
(package private) static NativeType |
InvokerUtil.getMethodResultNativeType(Runtime runtime,
java.lang.Class resultClass,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
private static ParameterType |
InvokerUtil.getParameterType(Runtime runtime,
java.lang.Class type,
java.util.Collection<java.lang.annotation.Annotation> annotations,
ToNativeConverter toNativeConverter,
ToNativeContext toNativeContext) |
private static ParameterType |
InvokerUtil.getParameterType(Runtime runtime,
java.lang.Class type,
java.util.Collection<java.lang.annotation.Annotation> annotations,
ToNativeType toNativeType,
ToNativeContext toNativeContext) |
(package private) static FromNativeType |
ClosureUtil.getParameterType(Runtime runtime,
java.lang.reflect.Method m,
int idx,
SignatureTypeMapper typeMapper) |
(package private) static ParameterType[] |
InvokerUtil.getParameterTypes(Runtime runtime,
SignatureTypeMapper typeMapper,
java.lang.reflect.Method m) |
(package private) static ResultType |
InvokerUtil.getResultType(Runtime runtime,
java.lang.Class type,
java.util.Collection<java.lang.annotation.Annotation> annotations,
FromNativeConverter fromNativeConverter,
FromNativeContext fromNativeContext) |
(package private) static ResultType |
InvokerUtil.getResultType(Runtime runtime,
java.lang.Class type,
java.util.Collection<java.lang.annotation.Annotation> annotations,
FromNativeType fromNativeType,
FromNativeContext fromNativeContext) |
(package private) static ToNativeType |
ClosureUtil.getResultType(Runtime runtime,
java.lang.reflect.Method m,
SignatureTypeMapper typeMapper) |
(package private) static Type |
Types.getType(Runtime runtime,
java.lang.Class javaType,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
java.lang.Object |
DefaultInvokerFactory.FunctionInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.ConvertingInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.VoidInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.BooleanInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.IntInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.LongInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.Float32Invoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.Float64Invoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
java.lang.Object |
DefaultInvokerFactory.PointerInvoker.invoke(Runtime runtime,
com.kenai.jffi.Function function,
com.kenai.jffi.HeapInvocationBuffer buffer) |
boolean |
NativeRuntime.isCompatible(Runtime other) |
private static Type |
Types.lookupAliasedType(Runtime runtime,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
private static Type |
Types.lookupAndCacheType(Runtime runtime,
java.lang.Class javaType,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
(package private) static Type |
Types.lookupType(Runtime runtime,
java.lang.Class type,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
private static FromNativeConverter |
ClosureFromNativeConverter.newClosureConverter(Runtime runtime,
AsmClassLoader classLoader,
java.lang.Class closureClass,
SignatureTypeMapper typeMapper) |
(package private) static <T> NativeClosureFactory |
NativeClosureFactory.newClosureFactory(Runtime runtime,
java.lang.Class<T> closureClass,
SignatureTypeMapper typeMapper,
AsmClassLoader classLoader) |
static StubCompiler |
StubCompiler.newCompiler(Runtime runtime) |
(package private) static Pointer |
MemoryUtil.newPointer(Runtime runtime,
int ptr) |
(package private) static Pointer |
MemoryUtil.newPointer(Runtime runtime,
long ptr) |
(package private) static Pointer |
MemoryUtil.newPointer(Runtime runtime,
long ptr,
long size) |
(package private) static NativeClosureProxy.Factory |
NativeClosureProxy.newProxyFactory(Runtime runtime,
java.lang.reflect.Method callMethod,
ToNativeType resultType,
FromNativeType[] parameterTypes,
AsmClassLoader classLoader) |
(package private) static AsmStructByReferenceFromNativeConverter |
AsmStructByReferenceFromNativeConverter.newStructByReferenceConverter(Runtime runtime,
java.lang.Class<? extends Struct> structClass,
int flags,
AsmClassLoader classLoader) |
static Pointer |
AsmRuntime.pointerValue(int ptr,
Runtime runtime) |
static Pointer |
AsmRuntime.pointerValue(long ptr,
Runtime runtime) |
Constructor and Description |
---|
AbstractAsmLibraryInterface(Runtime runtime,
NativeLibrary library) |
AbstractClosurePointer(Runtime runtime,
long functionAddress) |
AbstractX86StubCompiler(Runtime runtime) |
AllocatedDirectMemoryIO(Runtime runtime,
int size,
boolean clear) |
ArrayMemoryIO(Runtime runtime,
byte[] bytes,
int off,
int len) |
ArrayMemoryIO(Runtime runtime,
int size) |
AsmBuilder(Runtime runtime,
java.lang.String classNamePath,
org.objectweb.asm.ClassVisitor classVisitor,
AsmClassLoader classLoader) |
AsmStructByReferenceFromNativeConverter(Runtime runtime,
int flags) |
ByteBufferMemoryIO(Runtime runtime,
java.nio.ByteBuffer buffer) |
DefaultInvoker(Runtime runtime,
NativeLibrary nativeLibrary,
com.kenai.jffi.Function function,
DefaultInvokerFactory.FunctionInvoker invoker,
DefaultInvokerFactory.Marshaller[] marshallers) |
DefaultInvokerFactory(Runtime runtime,
NativeLibrary library,
SignatureTypeMapper typeMapper,
FunctionMapper functionMapper,
CallingConvention libraryCallingConvention,
java.util.Map<LibraryOption,?> libraryOptions,
boolean libraryIsSynchronized) |
DirectMemoryIO(Runtime runtime,
int address) |
DirectMemoryIO(Runtime runtime,
long address) |
Factory(Runtime runtime,
java.lang.reflect.Constructor<? extends NativeClosureProxy> constructor,
java.lang.reflect.Method invokeMethod,
java.lang.Object[] objectFields) |
GetRuntimeInvoker(Runtime runtime) |
NativeClosureFactory(Runtime runtime,
com.kenai.jffi.CallContext callContext,
NativeClosureProxy.Factory closureProxyFactory) |
NativeClosureManager(Runtime runtime,
SignatureTypeMapper typeMapper) |
NativeClosurePointer(Runtime runtime,
com.kenai.jffi.Closure.Handle handle,
NativeClosureProxy proxy) |
ProxyConverter(Runtime runtime,
java.lang.reflect.Constructor closureConstructor,
java.lang.Object[] initFields) |
SimpleNativeContext(Runtime runtime,
java.util.Collection<java.lang.annotation.Annotation> annotations) |
TransientNativeMemory(Runtime runtime,
TransientNativeMemory.Sentinel sentinel,
long address,
int size) |
VariableAccessorGenerator(Runtime runtime) |
VariadicInvoker(Runtime runtime,
DefaultInvokerFactory.FunctionInvoker functionInvoker,
SignatureTypeMapper typeMapper,
ParameterType[] fixedParameterTypes,
long functionAddress,
SigType resultType,
boolean requiresErrno,
CallingConvention callingConvention) |
X86_32StubCompiler(Runtime runtime) |
X86_64StubCompiler(Runtime runtime) |