@Implements(value=dalvik.system.VMRuntime.class, isInAndroidSdk=false) public class ShadowVMRuntime extends java.lang.Object
Constructor and Description |
---|
ShadowVMRuntime() |
Modifier and Type | Method and Description |
---|---|
long |
addressOf(java.lang.Object obj)
Returns a unique identifier of the object instead of a ‘native’ address.
|
java.lang.Object |
getObjectForAddress(long address)
Returns the object previously registered with
addressOf(Object) . |
protected boolean |
is64Bit()
Returns whether the VM is running in 64-bit mode.
|
java.lang.Object |
newNonMovableArray(java.lang.Class<?> type,
int size) |
java.lang.Object |
newUnpaddedArray(java.lang.Class<?> klass,
int size) |
static void |
reset() |
static void |
setIs64Bit(boolean is64Bit)
Sets whether the VM is running in 64-bit mode.
|
@Implementation(minSdk=21) public java.lang.Object newUnpaddedArray(java.lang.Class<?> klass, int size)
@Implementation public java.lang.Object newNonMovableArray(java.lang.Class<?> type, int size)
@Implementation public long addressOf(java.lang.Object obj)
Returns a unique identifier of the object instead of a ‘native’ address.
@Nullable public java.lang.Object getObjectForAddress(long address)
Returns the object previously registered with addressOf(Object)
.
@Implementation(minSdk=21) protected boolean is64Bit()
Returns whether the VM is running in 64-bit mode. Available in Android L+. Defaults to true.
public static void setIs64Bit(boolean is64Bit)
Sets whether the VM is running in 64-bit mode.
@Resetter public static void reset()