Package com.facebook.soloader
Class NativeLibrary
java.lang.Object
com.facebook.soloader.NativeLibrary
This is the base class for all the classes representing certain native library. For loading
native libraries we should always inherit from this class and provide relevant information
(libraries to load, code to test native call, dependencies?).
This instances should be singletons provided by DI.
This is a basic template but could be improved if we find the need.
-
Method Summary
Modifier and TypeMethodDescriptionvoidloads libraries (if not loaded yet), throws on failuregetError()booleansafe loading of native libs
-
Method Details
-
loadLibraries
@Nullable public boolean loadLibraries()safe loading of native libs- Returns:
- true if native libs loaded properly, false otherwise
-
ensureLoaded
loads libraries (if not loaded yet), throws on failure- Throws:
UnsatisfiedLinkError- UnsatisfiedLinkError
-
getError
-