public abstract class DexOpener extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DexOpener.Builder
The builder for
DexOpener. |
| Modifier and Type | Method and Description |
|---|---|
static DexOpener.Builder |
builder(Context context)
Instantiates a new
DexOpener.Builder instance. |
abstract void |
install(ClassLoader classLoader)
Provides the ability to mock final classes and methods.
|
static void |
install(Instrumentation instrumentation)
Provides the ability to mock final classes and methods.
|
public static void install(Instrumentation instrumentation)
This is equivalent to the following code:
Context context = instrumentation.getTargetContext();
builder(context).build().install(context.getClassLoader());
instrumentation - the instrumentationinstall(ClassLoader)public abstract void install(ClassLoader classLoader)
Note that final classes loaded before calling this cannot be mocked.
classLoader - the class loaderpublic static DexOpener.Builder builder(Context context)
DexOpener.Builder instance.context - the contextDexOpener.Builder