Package org.robolectric.nativeruntime
Class DefaultNativeRuntimeLoader
java.lang.Object
org.robolectric.nativeruntime.DefaultNativeRuntimeLoader
- All Implemented Interfaces:
NativeRuntimeLoader
@AutoService(NativeRuntimeLoader.class)
@Priority(-2147483648)
public class DefaultNativeRuntimeLoader
extends Object
implements NativeRuntimeLoader
Loads the Robolectric native runtime.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final com.google.common.collect.ImmutableList<String>
protected static final com.google.common.collect.ImmutableList<String>
DEFERRED_STATIC_INITIALIZERS
that invoke their own native methods in static initializers.protected static final com.google.common.collect.ImmutableList<String>
protected static final AtomicBoolean
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
protected void
-
Field Details
-
loaded
-
METHOD_BINDING_FORMAT
- See Also:
-
CORE_CLASS_NATIVES
-
GRAPHICS_CLASS_NATIVES
-
DEFERRED_STATIC_INITIALIZERS
DEFERRED_STATIC_INITIALIZERS
that invoke their own native methods in static initializers. Unlike libcore, registering JNI on the JVM causes static initialization to be performed on the class. Because of this, static initializers cannot invoke the native methods of the class under registration. Executing these static initializers must be deferred until after JNI has been registered.
-
-
Constructor Details
-
DefaultNativeRuntimeLoader
public DefaultNativeRuntimeLoader()
-
-
Method Details
-
injectAndLoad
public static void injectAndLoad() -
ensureLoaded
public void ensureLoaded()- Specified by:
ensureLoaded
in interfaceNativeRuntimeLoader
-
invokeDeferredStaticInitializers
protected void invokeDeferredStaticInitializers()
-