com.kenai.jaffl

Class LibraryOption

public class LibraryOption extends Enum<LibraryOption>

Options that apply to a library
Field Summary
static LibraryOptionCallingConvention
The type of calling convention.
static LibraryOptionFunctionMapper
A function mapper which maps from java function names to native function names.
static LibraryOptionIgnoreError
Function calls should NOT save the errno/last error after the call.
static LibraryOptionLoadNow
Load the library into memory immediately, instead of lazily loading it
static LibraryOptionSaveError
Function calls should save the errno/last error after the call.
static LibraryOptionTypeMapper
A type mapper which maps java types to native types is present.
static List<LibraryOption>VALUES
An immutable list containing the values comprising this enum class in the order they're declared.
Method Summary
List<LibraryOption>family()
Returns an immutable list containing the values comprising this enum class in the order they're declared.
static LibraryOptionvalueOf(String name)
Static factory to return the enum constant pertaining to the given string name.

Field Detail

CallingConvention

public static final LibraryOption CallingConvention
The type of calling convention.

See Also: CallingConvention

FunctionMapper

public static final LibraryOption FunctionMapper
A function mapper which maps from java function names to native function names.

IgnoreError

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 com.googlecode.jffi.annotations.SaveError annotation.

LoadNow

public static final LibraryOption LoadNow
Load the library into memory immediately, instead of lazily loading it

SaveError

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 com.googlecode.jffi.annotations.IgnoreError annotation.

TypeMapper

public static final LibraryOption TypeMapper
A type mapper which maps java types to native types is present.

VALUES

public static final List<LibraryOption> VALUES
An immutable list containing the values comprising this enum class in the order they're declared. This field may be used to iterate over the constants as follows:
for(LibraryOption c : LibraryOption.VALUES)
    System.out.println(c);

Method Detail

family

public final List<LibraryOption> family()
Returns an immutable list containing the values comprising this enum class in the order they're declared. This instance method simply returns VALUES. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to VALUES.

Returns: an immutable list containing the values comprising this enum class, in the order they're declared.

valueOf

public static final LibraryOption valueOf(String name)
Static factory to return the enum constant pertaining to the given string name. The string must match exactly an identifier used to declare an enum constant in this type.

Throws: IllegalArgumentException if this enum class has no constant with the specified name.