Package org.robovm.rt

Class VM

java.lang.Object
org.robovm.rt.VM

public final class VM
extends Object
Version:
$Id$
  • Constructor Details

    • VM

      public VM()
  • Method Details

    • bootClassPath

      public static String bootClassPath()
      Returns the VM's boot class path.
    • classPath

      public static String classPath()
      Returns the VM's class path.
    • imagePath

      public static String imagePath()
      Returns the path to the executable or dynamic library currently running.
    • resourcesPath

      public static String resourcesPath()
      Returns the resources path where the apps or frameworks resources are located. For executables this is typically the directory where the executable is located. For OS X/iOS frameworks this is typically the Resources folder located next to the dynamic library file.
    • staticLibs

      public static String[] staticLibs()
      Returns the names of any static libraries that have been linked into the executable.
    • vmVersion

      public static String vmVersion()
      Returns the VM's version.
    • getStackClasses

      public static final Class<?>[] getStackClasses​(int skipNum, int maxDepth)
      Returns the defining classes of the methods in the call stack. If skipNum is 0 the first entry in the returned array is the class of the method calling the caller of this method.
      Parameters:
      skipNum - the number of classes to skip.
      maxDepth - the max number of classes to return. -1 for the entire stack.
      Returns:
      the classes.
    • listClasses

      public static final Class<?>[] listClasses​(Class<?> assignableToClass, ClassLoader classLoader)
      Returns all Classes known to the VM optionally filtering on the specified class or interface Class.
      Parameters:
      assignableToClass - optional Class which all returned Classes must be assignment compatible with. Pass null to return all classes.
      classLoader - the ClassLoader which the returned Classes must belong to. Pass null for the boot ClassLoader.
      Returns:
      the matching classes.
    • getRuntimeData

      public static final byte[] getRuntimeData​(String id)
      Returns runtime data linked into the executable during compilation.
    • generateHeapDump

      public static final void generateHeapDump()
    • allocateMemory

      public static final long allocateMemory​(int size)
    • allocateMemoryUncollectable

      public static final long allocateMemoryUncollectable​(int size)
    • allocateMemoryAtomic

      public static final long allocateMemoryAtomic​(int size)
    • freeMemoryUncollectable

      public static final long freeMemoryUncollectable​(long address)
    • registerDisappearingLink

      public static void registerDisappearingLink​(long address, Object obj)
    • unregisterDisappearingLink

      public static void unregisterDisappearingLink​(long address)
    • malloc

      public static final long malloc​(int size)
    • free

      public static final void free​(long address)
    • allocateObject

      public static final <T> T allocateObject​(Class<T> cls)
    • newDirectByteBuffer

      public static final ByteBuffer newDirectByteBuffer​(long address, long capacity)
    • memcpy

      public static final void memcpy​(long s1, long s2, long n)
    • memmove8

      public static final void memmove8​(long s1, long s2, long n)
    • memmove16

      public static final void memmove16​(long s1, long s2, long n)
    • memmove32

      public static final void memmove32​(long s1, long s2, long n)
    • memmove64

      public static final void memmove64​(long s1, long s2, long n)
    • memset

      public static final void memset​(long s, byte c, long n)
    • getCallbackMethodImpl

      public static final long getCallbackMethodImpl​(Method method)
    • bindBridgeMethod

      public static final void bindBridgeMethod​(Method method, long impl)
    • isBridgeMethodBound

      public static final boolean isBridgeMethodBound​(Method method)
    • getObjectAddress

      public static final long getObjectAddress​(Object object)
    • castAddressToObject

      public static final Object castAddressToObject​(long address)
    • getFieldAddress

      public static final long getFieldAddress​(Field field)
    • getInstanceFieldOffset

      public static final int getInstanceFieldOffset​(long field)
    • getClassFieldAddress

      public static final long getClassFieldAddress​(long field)
    • getObject

      public static final Object getObject​(long address)
    • getDouble

      public static final double getDouble​(long address)
    • getFloat

      public static final float getFloat​(long address)
    • getLong

      public static final long getLong​(long address)
    • getInt

      public static final int getInt​(long address)
    • getChar

      public static final char getChar​(long address)
    • getShort

      public static final short getShort​(long address)
    • getByte

      public static final byte getByte​(long address)
    • getBoolean

      public static final boolean getBoolean​(long address)
    • setObject

      public static final void setObject​(long address, Object value)
    • setDouble

      public static final void setDouble​(long address, double value)
    • setFloat

      public static final void setFloat​(long address, float value)
    • setLong

      public static final void setLong​(long address, long value)
    • setInt

      public static final void setInt​(long address, int value)
    • setChar

      public static final void setChar​(long address, char value)
    • setShort

      public static final void setShort​(long address, short value)
    • setByte

      public static final void setByte​(long address, byte value)
    • setBoolean

      public static final void setBoolean​(long address, boolean value)
    • getPointer

      public static final long getPointer​(long address)
    • setPointer

      public static final void setPointer​(long address, long value)
    • getStringUTFChars

      public static final long getStringUTFChars​(String s)
    • newStringUTF

      public static final String newStringUTF​(long address)
    • newStringNoCopy

      public static final String newStringNoCopy​(char[] chars, int offset, int length)
    • getArrayValuesAddress

      public static final long getArrayValuesAddress​(Object array)
    • newBooleanArray

      public static final boolean[] newBooleanArray​(long address, int size)
    • newByteArray

      public static final byte[] newByteArray​(long address, int size)
    • newCharArray

      public static final char[] newCharArray​(long address, int size)
    • newShortArray

      public static final short[] newShortArray​(long address, int size)
    • newIntArray

      public static final int[] newIntArray​(long address, int size)
    • newLongArray

      public static final long[] newLongArray​(long address, int size)
    • newFloatArray

      public static final float[] newFloatArray​(long address, int size)
    • newDoubleArray

      public static final double[] newDoubleArray​(long address, int size)