Package org.robolectric.shadows
Class ShadowNativeAllocationRegistry
java.lang.Object
org.robolectric.shadows.ShadowNativeAllocationRegistry
@Implements(value=libcore.util.NativeAllocationRegistry.class,
minSdk=26,
isInAndroidSdk=false,
shadowPicker=Picker.class,
callNativeMethodsByDefault=true)
public class ShadowNativeAllocationRegistry
extends Object
Shadow for
NativeAllocationRegistry
that is backed by native code-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Shadow picker forNativeAllocationRegistry
. -
Field Summary
Modifier and TypeFieldDescriptionprotected libcore.util.NativeAllocationRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
__constructor__
(ClassLoader classLoader, Class clazz, long freeFunction, long size, boolean mallocAllocation) The newly introduced constructor (in version V) now performs a null check on the classLoader argument.protected static void
applyFreeFunction
(long freeFunction, long nativePtr) protected Runnable
registerNativeAllocation
(Object referent, long nativePtr)
-
Field Details
-
realNativeAllocationRegistry
-
-
Constructor Details
-
ShadowNativeAllocationRegistry
public ShadowNativeAllocationRegistry()
-
-
Method Details
-
__constructor__
@InDevelopment @Implementation(minSdk=35) protected void __constructor__(ClassLoader classLoader, Class clazz, long freeFunction, long size, boolean mallocAllocation) The newly introduced constructor (in version V) now performs a null check on the classLoader argument. We intercept the constructor calls so as to pass a non-null classloader. The classloader would be Robolectric's SandboxClassloader, but the value itself does not affect the behavior of actual class. -
registerNativeAllocation
-
applyFreeFunction
@Implementation(maxSdk=34) protected static void applyFreeFunction(long freeFunction, long nativePtr)
-