Package jnr.ffi.provider
Class InvalidRuntime
java.lang.Object
jnr.ffi.Runtime
jnr.ffi.provider.InvalidRuntime
A
Runtime
subclass that throws exceptions for all methods-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the address mask for this runtimeint
Gets the size of an address (e.g.Gets the native byte order of the runtime.findType
(NativeType type) Looks up the runtime-specific type that corresponds to the pseudo-typeLooks up the runtime-specific type that corresponds to the type aliasGets the native closure manager for this runtimeint
Gets the last native error code.Gets the native memory manager for this runtimeboolean
isCompatible
(Runtime other) Indicates whether thisRuntime
instance is compatible with anotherRuntime
instance.int
longSize()
Gets the size of a C long integer for this runtimeprivate UnsatisfiedLinkError
Creates a newObjectReferenceManager
void
setLastError
(int error) Sets the native error code.Methods inherited from class jnr.ffi.Runtime
getLoadedLibraries, getRuntime, getSystemRuntime
-
Field Details
-
message
-
cause
-
-
Constructor Details
-
InvalidRuntime
-
-
Method Details
-
findType
Description copied from class:Runtime
Looks up the runtime-specific type that corresponds to the pseudo-type -
findType
Description copied from class:Runtime
Looks up the runtime-specific type that corresponds to the type alias -
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
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
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
Description copied from class:Runtime
Gets the native byte order of the runtime. -
isCompatible
Description copied from class:Runtime
Indicates whether thisRuntime
instance is compatible with anotherRuntime
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
-