public static enum LibraryLoader.Mode extends java.lang.Enum<LibraryLoader.Mode>
| Enum Constant and Description |
|---|
BUNDLED_ONLY
Load the bundled version, ignoring the system.
|
PREFER_BUNDLED
Load the bundled native libraries first, then fallback to finding it in the system.
|
PREFER_SYSTEM
Try to load the system sodium first, if that fails — load the bundled version.
|
SYSTEM_ONLY
Load the system sodium only, ignoring the bundled.
|
| Modifier and Type | Method and Description |
|---|---|
static LibraryLoader.Mode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static LibraryLoader.Mode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LibraryLoader.Mode PREFER_SYSTEM
This is the recommended mode, because it allows the clients to upgrade the sodium library as soon as it is available instead of waiting for lazysodium release and releasing a new version of the client library/application.
public static final LibraryLoader.Mode PREFER_BUNDLED
public static final LibraryLoader.Mode BUNDLED_ONLY
This mode might be useful if the system sodium turns out to be outdated and cannot be upgraded.
public static final LibraryLoader.Mode SYSTEM_ONLY
This mode is recommended if it is required to use the system sodium only, and the application must fail if it is not installed.
public static LibraryLoader.Mode[] values()
for (LibraryLoader.Mode c : LibraryLoader.Mode.values()) System.out.println(c);
public static LibraryLoader.Mode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null