Top Description Inners Constructors Methods
org.graalvm.nativebridge

public final Class NativeObjectHandles

extends Object
Class Inheritance
Imports
org.graalvm.nativeimage.ObjectHandles, org.graalvm.word.WordFactory

A support class for mapping objects in the native image isolate to long handles.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NativeObjectHandles.InvalidHandleException

An exception thrown when an invalid handle is resolved.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static long
create(Object object)

Creates a handle for the object.

public static void
remove(long handle)

Removes a handle.

public static <T> T
resolve(long handle, Class<T> type)

Resolves a handle into an object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NativeObjectHandlesback to summary
private NativeObjectHandles()

Method Detail

createback to summary
public static long create(Object object)

Creates a handle for the object. Unless the handle is removed the object stays strongly reachable.

removeback to summary
public static void remove(long handle)

Removes a handle. Allows an object identified by the handle to be garbage collected.

resolveback to summary
public static <T> T resolve(long handle, Class<T> type)

Resolves a handle into an object.

Exceptions
InvalidHandleException:
if the handle is either already removed or invalid.
org.graalvm.nativebridge back to summary

public final Class NativeObjectHandles.InvalidHandleException

extends IllegalArgumentException
Class Inheritance

An exception thrown when an invalid handle is resolved.
See Also
resolve(long, Class)

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized Throwable
fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Fills in the execution stack trace.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.IllegalArgumentException.serialVersionUID.

Constructor Detail

InvalidHandleExceptionback to summary
pack-priv InvalidHandleException(IllegalArgumentException cause)

Method Detail

fillInStackTraceback to summary
public synchronized Throwable fillInStackTrace()

Overrides java.lang.Throwable.fillInStackTrace.

Doc from java.lang.Throwable.fillInStackTrace.

Fills in the execution stack trace. This method records within this Throwable object information about the current state of the stack frames for the current thread.

If the stack trace of this Throwable is not writable, calling this method has no effect.

Returns:Throwable

a reference to this Throwable instance.

Annotations
@Override