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 longaddressMask()Gets the address mask for this runtimeintaddressSize()Gets the size of an address (e.g.java.nio.ByteOrderbyteOrder()Gets the native byte order of the runtime.TypefindType(NativeType type)Looks up the runtime-specific type that corresponds to the pseudo-typeTypefindType(TypeAlias type)Looks up the runtime-specific type that corresponds to the type aliasClosureManagergetClosureManager()Gets the native closure manager for this runtimeintgetLastError()Gets the last native error code.MemoryManagergetMemoryManager()Gets the native memory manager for this runtimebooleanisCompatible(Runtime other)Indicates whether thisRuntimeinstance is compatible with anotherRuntimeinstance.intlongSize()Gets the size of a C long integer for this runtimeprivate java.lang.UnsatisfiedLinkErrornewLoadError()ObjectReferenceManagernewObjectReferenceManager()Creates a newObjectReferenceManagervoidsetLastError(int error)Sets the native error code.-
Methods inherited from class jnr.ffi.Runtime
getLoadedLibraries, getRuntime, getSystemRuntime
-
-
-
-
Method Detail
-
findType
public Type findType(NativeType type)
Description copied from class:RuntimeLooks up the runtime-specific type that corresponds to the pseudo-type
-
findType
public Type findType(TypeAlias type)
Description copied from class:RuntimeLooks up the runtime-specific type that corresponds to the type alias
-
getMemoryManager
public MemoryManager getMemoryManager()
Description copied from class:RuntimeGets the native memory manager for this runtime- Specified by:
getMemoryManagerin classRuntime- Returns:
- The
MemoryManagerof the runtime
-
getClosureManager
public ClosureManager getClosureManager()
Description copied from class:RuntimeGets the native closure manager for this runtime- Specified by:
getClosureManagerin classRuntime- Returns:
- The
ClosureManagerof the runtime
-
newObjectReferenceManager
public ObjectReferenceManager newObjectReferenceManager()
Description copied from class:RuntimeCreates a newObjectReferenceManager- Specified by:
newObjectReferenceManagerin classRuntime- Returns:
- A new
ObjectReferenceManager
-
getLastError
public int getLastError()
Description copied from class:RuntimeGets the last native error code.This returns the errno value that was set at the time of the last native function call.
- Specified by:
getLastErrorin classRuntime- Returns:
- The errno value.
-
setLastError
public void setLastError(int error)
Description copied from class:RuntimeSets the native error code.- Specified by:
setLastErrorin classRuntime- Parameters:
error- The value to set errno to.
-
addressMask
public long addressMask()
Description copied from class:RuntimeGets the address mask for this runtime- Specified by:
addressMaskin classRuntime- Returns:
- The address mask for the runtime.
-
addressSize
public int addressSize()
Description copied from class:RuntimeGets the size of an address (e.g. a pointer) for this runtime- Specified by:
addressSizein classRuntime- Returns:
- The size of an address in bytes.
-
longSize
public int longSize()
Description copied from class:RuntimeGets the size of a C long integer for this runtime
-
byteOrder
public java.nio.ByteOrder byteOrder()
Description copied from class:RuntimeGets the native byte order of the runtime.
-
isCompatible
public boolean isCompatible(Runtime other)
Description copied from class:RuntimeIndicates whether thisRuntimeinstance is compatible with anotherRuntimeinstance.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:
isCompatiblein 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()
-
-