public enum LibraryOption extends Enum<LibraryOption>
Enum Constant and Description |
---|
CallingConvention
The type of calling convention.
|
FunctionMapper
A function mapper which maps from java function names to native function names.
|
IgnoreError
Function calls should NOT save the errno/last error after the call.
|
LoadNow
Load the library into memory immediately, instead of lazily loading it
|
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. |
SaveError
Function calls should save the errno/last error after the call.
|
TypeMapper
A type mapper which maps java types to native types is present.
|
Modifier and Type | Method and Description |
---|---|
static LibraryOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LibraryOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LibraryOption SaveError
IgnoreError
annotation.public static final LibraryOption IgnoreError
SaveError
annotation.public static final LibraryOption TypeMapper
public static final LibraryOption FunctionMapper
public static final LibraryOption CallingConvention
CallingConvention
public static final LibraryOption LoadNow
public static final LibraryOption PreferCustomPaths
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.public static LibraryOption[] values()
for (LibraryOption c : LibraryOption.values()) System.out.println(c);
public static LibraryOption valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2024. All rights reserved.