Top Fields Constructors Methods
jnr.ffi.provider

public abstract Class AbstractRuntime

extends Runtime
Class Inheritance
Known Direct Subclasses
jnr.ffi.provider.jffi.NativeRuntime
Imports
jnr.ffi.NativeType, .Runtime, .Type, java.nio.ByteOrder, java.util.EnumMap, .EnumSet

Field Summary

Modifier and TypeField and Description
private final long
private final int
private final ByteOrder
private final int
private final Type[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final long
addressMask()

Implements abstract jnr.ffi.Runtime.addressMask.

Gets the address mask for this runtime
public final int

Returns:

The size of an address in bytes.
addressSize
()

Implements abstract jnr.ffi.Runtime.addressSize.

Gets the size of an address (e.g. a pointer) for this runtime
public final ByteOrder

Returns:

this runtime's byte order
byteOrder
()

Implements abstract jnr.ffi.Runtime.byteOrder.

Retrieves this runtime's native byte order.
public final Type
findType(NativeType
The native pseudo-type.
type
)

Implements abstract jnr.ffi.Runtime.findType.

Looks up the runtime-specific that corresponds to the pseudo-type
public abstract int

Returns:

The errno value.
getLastError
()

Implements abstract jnr.ffi.Runtime.getLastError.

Gets the last native error code.
public abstract MemoryManager

Returns:

a MemoryManager
getMemoryManager
()

Implements abstract jnr.ffi.Runtime.getMemoryManager.

Gets the native memory manager instance for this runtime
public final int

Returns:

The size of a C long integer in bytes.
longSize
()

Implements abstract jnr.ffi.Runtime.longSize.

Gets the size of a C long integer for this runtime
public abstract void
setLastError(int
The value to set errno to.
error
)

Implements abstract jnr.ffi.Runtime.setLastError.

Sets the native error code.
Inherited from jnr.ffi.Runtime:
findTypegetClosureManagergetLoadedLibrariesgetRuntimegetSystemRuntimeisCompatiblenewObjectReferenceManager

Field Detail

addressMaskback to summary
private final long addressMask
addressSizeback to summary
private final int addressSize
byteOrderback to summary
private final ByteOrder byteOrder
longSizeback to summary
private final int longSize
typesback to summary
private final Type[] types

Constructor Detail

AbstractRuntimeback to summary
public AbstractRuntime(ByteOrder byteOrder, EnumMap<NativeType, Type> typeMap)

Method Detail

addressMaskback to summary
public final long addressMask()

Implements abstract jnr.ffi.Runtime.addressMask.

Gets the address mask for this runtime

Returns:long

Doc from jnr.ffi.Runtime.addressMask.

The address mask for the runtime.

addressSizeback to summary
public final int addressSize()

Implements abstract jnr.ffi.Runtime.addressSize.

Gets the size of an address (e.g. a pointer) for this runtime

Returns:int

The size of an address in bytes.

byteOrderback to summary
public final ByteOrder byteOrder()

Implements abstract jnr.ffi.Runtime.byteOrder.

Retrieves this runtime's native byte order.

Returns:ByteOrder

this runtime's byte order

findTypeback to summary
public final Type findType(NativeType type)

Implements abstract jnr.ffi.Runtime.findType.

Looks up the runtime-specific that corresponds to the pseudo-type

Parameters
type:NativeType

Doc from jnr.ffi.Runtime.findType.

The native pseudo-type.

Returns:Type

Doc from jnr.ffi.Runtime.findType.

A Type instance.

getLastErrorback to summary
public abstract int getLastError()

Implements abstract jnr.ffi.Runtime.getLastError.

Gets the last native error code.

This returns the errno value that was set at the time of the last native function call.

Returns:int

The errno value.

getMemoryManagerback to summary
public abstract MemoryManager getMemoryManager()

Implements abstract jnr.ffi.Runtime.getMemoryManager.

Gets the native memory manager instance for this runtime

Returns:MemoryManager

a MemoryManager

longSizeback to summary
public final int longSize()

Implements abstract jnr.ffi.Runtime.longSize.

Gets the size of a C long integer for this runtime

Returns:int

The size of a C long integer in bytes.

setLastErrorback to summary
public abstract void setLastError(int error)

Implements abstract jnr.ffi.Runtime.setLastError.

Sets the native error code.

Parameters
error:int

The value to set errno to.