public class ReLinkerInstance
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
force |
protected ReLinker.LibraryInstaller |
libraryInstaller |
protected ReLinker.LibraryLoader |
libraryLoader |
protected java.util.Set<java.lang.String> |
loadedLibraries |
protected ReLinker.Logger |
logger |
protected boolean |
recursive |
| Modifier | Constructor and Description |
|---|---|
protected |
ReLinkerInstance() |
protected |
ReLinkerInstance(ReLinker.LibraryLoader libraryLoader,
ReLinker.LibraryInstaller libraryInstaller) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupOldLibFiles(android.content.Context context,
java.lang.String library,
java.lang.String currentVersion)
Cleans up any other versions of the
library. |
ReLinkerInstance |
force()
Forces any previously extracted / re-linked libraries to be cleaned up before loading
|
protected java.io.File |
getWorkaroundLibDir(android.content.Context context) |
protected java.io.File |
getWorkaroundLibFile(android.content.Context context,
java.lang.String library,
java.lang.String version) |
void |
loadLibrary(android.content.Context context,
java.lang.String library)
Utilizes the regular system call to attempt to load a native library.
|
void |
loadLibrary(android.content.Context context,
java.lang.String library,
ReLinker.LoadListener listener)
The same call as
loadLibrary(Context, String), however if a
ReLinker.LoadListener is provided, the function is executed asynchronously. |
void |
loadLibrary(android.content.Context context,
java.lang.String library,
java.lang.String version)
The same call as
loadLibrary(Context, String), however if a version is
provided, then that specific version of the given library is loaded. |
void |
loadLibrary(android.content.Context context,
java.lang.String library,
java.lang.String version,
ReLinker.LoadListener listener)
Attemps to load the given library normally.
|
ReLinkerInstance |
log(ReLinker.Logger logger)
Logs debugging related information to the
ReLinker.Logger instance given |
void |
log(java.lang.String message) |
void |
log(java.lang.String format,
java.lang.Object... args) |
ReLinkerInstance |
recursively()
Enables recursive library loading to resolve and load shared object -> shared object
defined dependencies
|
protected final java.util.Set<java.lang.String> loadedLibraries
protected final ReLinker.LibraryLoader libraryLoader
protected final ReLinker.LibraryInstaller libraryInstaller
protected boolean force
protected boolean recursive
protected ReLinker.Logger logger
protected ReLinkerInstance()
protected ReLinkerInstance(ReLinker.LibraryLoader libraryLoader, ReLinker.LibraryInstaller libraryInstaller)
public ReLinkerInstance log(ReLinker.Logger logger)
ReLinker.Logger instance givenpublic ReLinkerInstance force()
public ReLinkerInstance recursively()
public void loadLibrary(android.content.Context context,
java.lang.String library)
Note: This is a synchronous operation
public void loadLibrary(android.content.Context context,
java.lang.String library,
java.lang.String version)
loadLibrary(Context, String), however if a version is
provided, then that specific version of the given library is loaded.public void loadLibrary(android.content.Context context,
java.lang.String library,
ReLinker.LoadListener listener)
loadLibrary(Context, String), however if a
ReLinker.LoadListener is provided, the function is executed asynchronously.public void loadLibrary(android.content.Context context,
java.lang.String library,
java.lang.String version,
ReLinker.LoadListener listener)
context - The Context to get a workaround directory fromlibrary - The library you wish to loadversion - The version of the library you wish to load, or nulllistener - ReLinker.LoadListener to listen for async execution, or nullprotected java.io.File getWorkaroundLibDir(android.content.Context context)
context - Context to describe the location of it's private directoriesFile locating the directory that can store extracted libraries
for later useprotected java.io.File getWorkaroundLibFile(android.content.Context context,
java.lang.String library,
java.lang.String version)
context - Context to retrieve the workaround directory fromlibrary - The name of the library to loadversion - The version of the library to load or nullFile locating the workaround library file to loadprotected void cleanupOldLibFiles(android.content.Context context,
java.lang.String library,
java.lang.String currentVersion)
library. If force is used, all
versions of the library are deletedcontext - Context to retrieve the workaround directory fromlibrary - The name of the library to loadcurrentVersion - The version of the library to keep, all other versions will be deleted.
This parameter is ignored if force is used.public void log(java.lang.String format,
java.lang.Object... args)
public void log(java.lang.String message)