
org.robolectric.shadows.ShadowVMRuntime Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import dalvik.system.VMRuntime;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import java.lang.reflect.Array;
@Implements(value = VMRuntime.class, isInAndroidSdk = false)
public class ShadowVMRuntime {
@Implementation
public Object newUnpaddedArray(Class> klass, int size) {
return Array.newInstance(klass, size);
}
@Implementation
public Object newNonMovableArray(Class> type, int size) {
if (type.equals(int.class)) {
return new int[size];
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy