Language

JniEnvironment.References Class

Definition

JNI Reference-related functionality.

public static class JniEnvironment.References
type JniEnvironment.References = class
Inheritance
JniEnvironment.References

Remarks

The JniEnvironment.References class exposes JNI Global, Local, Weak-Global-related functionality which is not exposed by the JniObjectReference class, particularly JNI reference creation and destruction.

Methods

Name Description
CreatedReference(JniObjectReference)

Account for the creation of a JNI Reference.

EnsureLocalCapacity(Int32)

Ensures local-reference capacity, throwing a managed exception when the native request fails.

GetIdentityHashCode(JniObjectReference)

Returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().

GetJavaVM(IntPtr)

Gets the Java VM invocation pointer and reports native failure as a managed exception.

NewReturnToJniRef(IJavaPeerable)

Creates a local reference for return to JNI and removes it from managed local-reference accounting.

NewReturnToJniRef(JniObjectReference)

Creates and transfers a local reference for a JNI return value.

PopLocalFrame(JniObjectReference)

Pops the current native local-reference frame and optionally preserves one result.

PushLocalFrame(Int32)

Creates a native local-reference frame, throwing a managed exception if the request fails.

Applies to