public final class NativeRuntime extends AbstractRuntime
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Type |
findType(TypeAlias type)
Looks up the runtime-specific type that corresponds to the type alias
|
jnr.ffi.provider.jffi.NativeClosureManager |
getClosureManager()
Gets the native closure manager for this runtime
|
static NativeRuntime |
getInstance() |
int |
getLastError()
Gets the last native error code.
|
NativeMemoryManager |
getMemoryManager()
Gets the native memory manager instance for this runtime
|
int |
hashCode() |
boolean |
isCompatible(Runtime other)
Indicates whether this Runtime instance is compatible with another Runtime instance.
|
ObjectReferenceManager |
newObjectReferenceManager()
Creates a new
ObjectReferenceManager |
void |
setLastError(int error)
Sets the native error code.
|
addressMask, addressSize, byteOrder, findType, longSize
getRuntime, getSystemRuntime
public static NativeRuntime getInstance()
public Type findType(TypeAlias type)
Runtime
public final NativeMemoryManager getMemoryManager()
AbstractRuntime
getMemoryManager
in class AbstractRuntime
MemoryManager
public jnr.ffi.provider.jffi.NativeClosureManager getClosureManager()
Runtime
getClosureManager
in class Runtime
ClosureManager
of the runtimepublic ObjectReferenceManager newObjectReferenceManager()
Runtime
ObjectReferenceManager
newObjectReferenceManager
in class Runtime
ObjectReferenceManager
public int getLastError()
AbstractRuntime
This returns the errno value that was set at the time of the last native function call.
getLastError
in class AbstractRuntime
public void setLastError(int error)
AbstractRuntime
setLastError
in class AbstractRuntime
error
- The value to set errno to.public boolean isCompatible(Runtime other)
Runtime
This is not the same as calling Object.equals(java.lang.Object)
- this method only indicates whether or not artifacts from the
runtime (e.g. memory addresses) are compatible with artifacts from this one.
This is mostly for internal use.
isCompatible
in class Runtime
other
- the other runtime to test for compatibilityCopyright © 2017. All rights reserved.