Top Description Fields Constructors Methods
jnr.ffi.provider

pack-priv Class InvalidRuntime

extends Runtime
Class Inheritance
Imports
jnr.ffi.NativeType, .ObjectReferenceManager, .Runtime, .Type, .TypeAlias, java.nio.ByteOrder

A jnr.ffi.Runtime subclass that throws exceptions for all methods

Field Summary

Modifier and TypeField and Description
private final Throwable
private final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
addressMask()

Implements abstract jnr.ffi.Runtime.addressMask.

Gets the address mask for this runtime
public int
addressSize()

Implements abstract jnr.ffi.Runtime.addressSize.

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

Implements abstract jnr.ffi.Runtime.byteOrder.

Gets the native byte order of the runtime.
public Type
findType(NativeType
The native pseudo-type.
type
)

Implements abstract jnr.ffi.Runtime.findType.

Looks up the runtime-specific type that corresponds to the pseudo-type
public Type
findType(TypeAlias
the type alias.
type
)

Implements abstract jnr.ffi.Runtime.findType.

Looks up the runtime-specific type that corresponds to the type alias
public ClosureManager
getClosureManager()

Implements abstract jnr.ffi.Runtime.getClosureManager.

Gets the native closure manager for this runtime
public int
getLastError()

Implements abstract jnr.ffi.Runtime.getLastError.

Gets the last native error code.
public MemoryManager
getMemoryManager()

Implements abstract jnr.ffi.Runtime.getMemoryManager.

Gets the native memory manager for this runtime
public boolean
isCompatible(Runtime
the other runtime to test for compatibility
other
)

Implements abstract jnr.ffi.Runtime.isCompatible.

Indicates whether this Runtime instance is compatible with another Runtime instance.
public int
longSize()

Implements abstract jnr.ffi.Runtime.longSize.

Gets the size of a C long integer for this runtime
private UnsatisfiedLinkError
public ObjectReferenceManager<T>
newObjectReferenceManager()

Implements abstract jnr.ffi.Runtime.newObjectReferenceManager.

Creates a new ObjectReferenceManager
public 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:
getLoadedLibrariesgetRuntimegetSystemRuntime

Field Detail

causeback to summary
private final Throwable cause
messageback to summary
private final String message

Constructor Detail

InvalidRuntimeback to summary
pack-priv InvalidRuntime(String message, Throwable cause)

Method Detail

addressMaskback to summary
public long addressMask()

Implements abstract jnr.ffi.Runtime.addressMask.

Doc from jnr.ffi.Runtime.addressMask.

Gets the address mask for this runtime

Returns:long

The address mask for the runtime.

Annotations
@Override
addressSizeback to summary
public int addressSize()

Implements abstract jnr.ffi.Runtime.addressSize.

Doc from 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.

Annotations
@Override
byteOrderback to summary
public ByteOrder byteOrder()

Implements abstract jnr.ffi.Runtime.byteOrder.

Doc from jnr.ffi.Runtime.byteOrder.

Gets the native byte order of the runtime.

Returns:ByteOrder

The byte order of the runtime

Annotations
@Override
findTypeback to summary
public Type findType(NativeType type)

Implements abstract jnr.ffi.Runtime.findType.

Doc from jnr.ffi.Runtime.findType.

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

Parameters
type:NativeType

The native pseudo-type.

Returns:Type

A Type instance.

Annotations
@Override
findTypeback to summary
public Type findType(TypeAlias type)

Implements abstract jnr.ffi.Runtime.findType.

Doc from jnr.ffi.Runtime.findType.

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

Parameters
type:TypeAlias

the type alias.

Returns:Type

A Type instance

Annotations
@Override
getClosureManagerback to summary
public ClosureManager getClosureManager()

Implements abstract jnr.ffi.Runtime.getClosureManager.

Doc from jnr.ffi.Runtime.getClosureManager.

Gets the native closure manager for this runtime

Returns:ClosureManager

The ClosureManager of the runtime

Annotations
@Override
getLastErrorback to summary
public int getLastError()

Implements abstract jnr.ffi.Runtime.getLastError.

Doc from 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.

Annotations
@Override
getMemoryManagerback to summary
public MemoryManager getMemoryManager()

Implements abstract jnr.ffi.Runtime.getMemoryManager.

Doc from jnr.ffi.Runtime.getMemoryManager.

Gets the native memory manager for this runtime

Returns:MemoryManager

The MemoryManager of the runtime

Annotations
@Override
isCompatibleback to summary
public boolean isCompatible(Runtime other)

Implements abstract jnr.ffi.Runtime.isCompatible.

Doc from jnr.ffi.Runtime.isCompatible.

Indicates whether this Runtime instance is compatible with another Runtime instance.

This is not the same as calling equals - 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.

Parameters
other:Runtime

the other runtime to test for compatibility

Returns:boolean

true if the other runtime is compatible with this one

Annotations
@Override
longSizeback to summary
public int longSize()

Implements abstract jnr.ffi.Runtime.longSize.

Doc from 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.

Annotations
@Override
newLoadErrorback to summary
private UnsatisfiedLinkError newLoadError()
newObjectReferenceManagerback to summary
public ObjectReferenceManager<T> newObjectReferenceManager()

Implements abstract jnr.ffi.Runtime.newObjectReferenceManager.

Doc from jnr.ffi.Runtime.newObjectReferenceManager.

Creates a new ObjectReferenceManager

Returns:ObjectReferenceManager<T>

A new ObjectReferenceManager

Annotations
@Override
setLastErrorback to summary
public void setLastError(int error)

Implements abstract jnr.ffi.Runtime.setLastError.

Doc from jnr.ffi.Runtime.setLastError.

Sets the native error code.

Parameters
error:int

The value to set errno to.

Annotations
@Override