Class ShadowNoopNativeAllocationRegistry

java.lang.Object
org.robolectric.shadows.ShadowNoopNativeAllocationRegistry

@Implements(value=libcore.util.NativeAllocationRegistry.class, minSdk=24, isInAndroidSdk=false) public class ShadowNoopNativeAllocationRegistry extends Object
Shadow for NativeAllocationRegistry that is a no-op.
  • Field Details

    • realNativeAllocationRegistry

      @RealObject protected libcore.util.NativeAllocationRegistry realNativeAllocationRegistry
  • Constructor Details

    • ShadowNoopNativeAllocationRegistry

      public ShadowNoopNativeAllocationRegistry()
  • Method Details

    • registerNativeAllocation

      @Implementation(maxSdk=28) protected Runnable registerNativeAllocation(Object referent, Object allocator)
    • registerNativeAllocation

      @Implementation protected Runnable registerNativeAllocation(Object referent, long nativePtr)
    • __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.