Package io.objectbox.internal
Class NativeLibraryLoader
- java.lang.Object
-
- io.objectbox.internal.NativeLibraryLoader
-
public class NativeLibraryLoader extends java.lang.ObjectSeparate class, so we can mock BoxStore.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringOBJECTBOX_JNI
-
Constructor Summary
Constructors Constructor Description NativeLibraryLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidcheckUnpackLib(java.lang.String filename)static voidensureLoaded()private static java.lang.StringgetCpuArch()Get CPU architecture of the JVM (Note: this can not be used for Android, Android decides arch on its own and looks for library in appropriately named folder).private static java.lang.StringgetCpuArchOSOrNull()Get architecture using operating system tools.private static java.lang.StringgetSupportedABIsAndroid()Return a string containing a list of ABIs that are supported by the current Android device.private static booleanloadLibraryAndroid()
-
-
-
Field Detail
-
OBJECTBOX_JNI
private static final java.lang.String OBJECTBOX_JNI
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCpuArch
private static java.lang.String getCpuArch()
Get CPU architecture of the JVM (Note: this can not be used for Android, Android decides arch on its own and looks for library in appropriately named folder).Note that this may not be the architecture of the actual hardware (e.g. when running a x86 JVM on an amd64 machine).
-
getCpuArchOSOrNull
@Nullable private static java.lang.String getCpuArchOSOrNull()
Get architecture using operating system tools. Currently only Linux is supported (using uname).
-
checkUnpackLib
private static void checkUnpackLib(java.lang.String filename)
-
loadLibraryAndroid
private static boolean loadLibraryAndroid()
-
getSupportedABIsAndroid
@Nonnull private static java.lang.String getSupportedABIsAndroid()
Return a string containing a list of ABIs that are supported by the current Android device. If the Android device is below API level 21 (Android 5) or if looking up the value fails, returns an empty string.
-
ensureLoaded
public static void ensureLoaded()
-
-