Top Description Fields Constructors Methods
jnr.ffi

public final Enum LibraryOption

extends Enum<LibraryOption>
Class Inheritance
Imports
java.util.Map

Options that apply to a library

Field Summary

Modifier and TypeField and Description
public static final LibraryOption
CallingConvention

The type of calling convention.

public static final LibraryOption
FunctionMapper

A function mapper which maps from java function names to native function names.

public static final LibraryOption
IgnoreError

Function calls should NOT save the errno/last error after the call.

public static final LibraryOption
LoadNow

Load the library into memory immediately, instead of lazily loading it

public static final LibraryOption
PreferCustomPaths

Relevant for GNU/Linux Platform.Linux only Prefer custom paths over system paths when loading a library, even if the custom path has a lower version.

public static final LibraryOption
SaveError

Function calls should save the errno/last error after the call.

public static final LibraryOption
TypeMapper

A type mapper which maps java types to native types is present.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static LibraryOption
public static LibraryOption[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CallingConventionback to summary
public static final LibraryOption CallingConvention

The type of calling convention.

See Also
CallingConvention
FunctionMapperback to summary
public static final LibraryOption FunctionMapper

A function mapper which maps from java function names to native function names.

IgnoreErrorback to summary
public static final LibraryOption IgnoreError

Function calls should NOT save the errno/last error after the call. This option can be overridden on individual methods by use of the jnr.ffi.annotations.SaveError annotation.

See Also
LibraryLoader#saveError(Map, boolean, boolean)
LoadNowback to summary
public static final LibraryOption LoadNow

Load the library into memory immediately, instead of lazily loading it

PreferCustomPathsback to summary
public static final LibraryOption PreferCustomPaths

Relevant for GNU/Linux Platform.Linux only Prefer custom paths over system paths when loading a library, even if the custom path has a lower version. By default JNR-FFI will choose the library of the desired name with the highest version, whether in the custom paths or the system default paths. This can be a problem if you are distributing your own library for example libfoo.so and the system paths happen to have a libfoo.so.4 for example, in which case JNR-FFI will prefer the higher version despite your explicit custom paths. By using this option, JNR-FFI will know to prefer the custom paths, even if they have a lower version, this ensures consistent behaviors across environments.

SaveErrorback to summary
public static final LibraryOption SaveError

Function calls should save the errno/last error after the call. This option can be overridden on individual methods by use of the jnr.ffi.annotations.IgnoreError annotation.

See Also
LibraryLoader#saveError(Map, boolean, boolean)
TypeMapperback to summary
public static final LibraryOption TypeMapper

A type mapper which maps java types to native types is present.

Constructor Detail

LibraryOptionback to summary
private LibraryOption()

Method Detail

valueOfback to summary
public static LibraryOption valueOf(String name)
valuesback to summary
public static LibraryOption[] values()