Class ShadowVMRuntime


  • @Implements(value=dalvik.system.VMRuntime.class,
                isInAndroidSdk=false)
    public class ShadowVMRuntime
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ShadowVMRuntime()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long addressOf​(java.lang.Object obj)
      Returns a unique identifier of the object instead of a 'native' address.
      protected static java.lang.String getCurrentInstructionSet()
      Returns the instruction set of the current runtime.
      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 setCurrentInstructionSet​(java.lang.String currentInstructionSet)
      Sets the instruction set of the current runtime.
      static void setIs64Bit​(boolean is64Bit)
      Sets whether the VM is running in 64-bit mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowVMRuntime

        public ShadowVMRuntime()
    • Method Detail

      • newUnpaddedArray

        @Implementation(minSdk=21)
        public java.lang.Object newUnpaddedArray​(java.lang.Class<?> klass,
                                                 int size)
      • newNonMovableArray

        @Implementation
        public java.lang.Object newNonMovableArray​(java.lang.Class<?> type,
                                                   int size)
      • addressOf

        @Implementation
        public long addressOf​(java.lang.Object obj)
        Returns a unique identifier of the object instead of a 'native' address.
      • getObjectForAddress

        @Nullable
        public java.lang.Object getObjectForAddress​(long address)
        Returns the object previously registered with addressOf(Object).
      • is64Bit

        @Implementation(minSdk=21)
        protected boolean is64Bit()
        Returns whether the VM is running in 64-bit mode. Available in Android L+. Defaults to true.
      • setIs64Bit

        public static void setIs64Bit​(boolean is64Bit)
        Sets whether the VM is running in 64-bit mode.
      • getCurrentInstructionSet

        @Implementation(minSdk=21)
        protected static java.lang.String getCurrentInstructionSet()
        Returns the instruction set of the current runtime.
      • setCurrentInstructionSet

        public static void setCurrentInstructionSet​(@Nullable
                                                    java.lang.String currentInstructionSet)
        Sets the instruction set of the current runtime.
      • reset

        @Resetter
        public static void reset()