Class NativeObjectHandles

java.lang.Object
org.graalvm.nativebridge.NativeObjectHandles

public final class NativeObjectHandles extends Object
A support class for mapping objects in the native image isolate to long handles.
  • Method Details

    • create

      public static long create(Object object)
      Creates a handle for the object. Unless the handle is removed the object stays strongly reachable.
    • resolve

      public static <T> T resolve(long handle, Class<T> type)
      Resolves a handle into an object.
      Throws:
      NativeObjectHandles.InvalidHandleException - if the handle is either already removed or invalid.
    • remove

      public static void remove(long handle)
      Removes a handle. Allows an object identified by the handle to be garbage collected.