Package jnr.ffi.provider
Class InvalidRuntime
- java.lang.Object
-
- jnr.ffi.Runtime
-
- jnr.ffi.provider.InvalidRuntime
-
-
Constructor Summary
Constructors Constructor Description InvalidRuntime(java.lang.String message, java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
addressMask()
Gets the address mask for this runtimeint
addressSize()
Gets the size of an address (e.g.java.nio.ByteOrder
byteOrder()
Gets the native byte order of the runtime.Type
findType(NativeType type)
Looks up the runtime-specific type that corresponds to the pseudo-typeType
findType(TypeAlias type)
Looks up the runtime-specific type that corresponds to the type aliasClosureManager
getClosureManager()
Gets the native closure manager for this runtimeint
getLastError()
Gets the last native error code.MemoryManager
getMemoryManager()
Gets the native memory manager for this runtimeboolean
isCompatible(Runtime other)
Indicates whether this Runtime instance is compatible with another Runtime instance.int
longSize()
Gets the size of a C long integer for this runtimeprivate java.lang.UnsatisfiedLinkError
newLoadError()
ObjectReferenceManager
newObjectReferenceManager()
Creates a newObjectReferenceManager
void
setLastError(int error)
Sets the native error code.-
Methods inherited from class jnr.ffi.Runtime
getRuntime, getSystemRuntime
-
-
-
-
Method Detail
-
findType
public Type findType(NativeType type)
Description copied from class:Runtime
Looks up the runtime-specific type that corresponds to the pseudo-type
-
findType
public Type findType(TypeAlias type)
Description copied from class:Runtime
Looks up the runtime-specific type that corresponds to the type alias
-
getMemoryManager
public MemoryManager getMemoryManager()
Description copied from class:Runtime
Gets the native memory manager for this runtime- Specified by:
getMemoryManager
in classRuntime
- Returns:
- The
MemoryManager
of the runtime
-
getClosureManager
public ClosureManager getClosureManager()
Description copied from class:Runtime
Gets the native closure manager for this runtime- Specified by:
getClosureManager
in classRuntime
- Returns:
- The
ClosureManager
of the runtime
-
newObjectReferenceManager
public ObjectReferenceManager newObjectReferenceManager()
Description copied from class:Runtime
Creates a newObjectReferenceManager
- Specified by:
newObjectReferenceManager
in classRuntime
- Returns:
- A new
ObjectReferenceManager
-
getLastError
public int getLastError()
Description copied from class:Runtime
Gets the last native error code.This returns the errno value that was set at the time of the last native function call.
- Specified by:
getLastError
in classRuntime
- Returns:
- The errno value.
-
setLastError
public void setLastError(int error)
Description copied from class:Runtime
Sets the native error code.- Specified by:
setLastError
in classRuntime
- Parameters:
error
- The value to set errno to.
-
addressMask
public long addressMask()
Description copied from class:Runtime
Gets the address mask for this runtime- Specified by:
addressMask
in classRuntime
- Returns:
- The address mask for the runtime.
-
addressSize
public int addressSize()
Description copied from class:Runtime
Gets the size of an address (e.g. a pointer) for this runtime- Specified by:
addressSize
in classRuntime
- Returns:
- The size of an address in bytes.
-
longSize
public int longSize()
Description copied from class:Runtime
Gets the size of a C long integer for this runtime
-
byteOrder
public java.nio.ByteOrder byteOrder()
Description copied from class:Runtime
Gets the native byte order of the runtime.
-
isCompatible
public boolean isCompatible(Runtime other)
Description copied from class:Runtime
Indicates whether this Runtime instance is compatible with another Runtime instance.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.
- Specified by:
isCompatible
in classRuntime
- Parameters:
other
- the other runtime to test for compatibility- Returns:
- true if the other runtime is compatible with this one
-
newLoadError
private java.lang.UnsatisfiedLinkError newLoadError()
-
-