- java.lang.Object
-
- jnr.ffi.Runtime
-
- jnr.ffi.provider.AbstractRuntime
-
- Direct Known Subclasses:
NativeRuntime
public abstract class AbstractRuntime extends Runtime
-
-
Constructor Summary
Constructors Constructor Description AbstractRuntime(ByteOrder byteOrder, EnumMap<NativeType,Type> typeMap)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description longaddressMask()Gets the address mask for this runtimeintaddressSize()Gets the size of an address (e.g.ByteOrderbyteOrder()Retrieves this runtime's native byte order.TypefindType(NativeType type)Looks up the runtime-specific that corresponds to the pseudo-typeabstract intgetLastError()Gets the last native error code.abstract MemoryManagergetMemoryManager()Gets the native memory manager instance for this runtimeintlongSize()Gets the size of a C long integer for this runtimeabstract voidsetLastError(int error)Sets the native error code.-
Methods inherited from class jnr.ffi.Runtime
findType, getClosureManager, getLoadedLibraries, getRuntime, getSystemRuntime, isCompatible, newObjectReferenceManager
-
-
-
-
Constructor Detail
-
AbstractRuntime
public AbstractRuntime(ByteOrder byteOrder, EnumMap<NativeType,Type> typeMap)
-
-
Method Detail
-
findType
public final Type findType(NativeType type)
Looks up the runtime-specific that corresponds to the pseudo-type
-
getMemoryManager
public abstract MemoryManager getMemoryManager()
Gets the native memory manager instance for this runtime- Specified by:
getMemoryManagerin classRuntime- Returns:
- a
MemoryManager
-
getLastError
public abstract int getLastError()
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:
getLastErrorin classRuntime- Returns:
- The errno value.
-
setLastError
public abstract void setLastError(int error)
Sets the native error code.- Specified by:
setLastErrorin classRuntime- Parameters:
error- The value to set errno to.
-
addressMask
public final long addressMask()
Gets the address mask for this runtime- Specified by:
addressMaskin classRuntime- Returns:
- The address mask for the runtime.
-
addressSize
public final int addressSize()
Gets 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 final int longSize()
Gets the size of a C long integer for this runtime
-
-