Language

JniType.GetCachedJniType Method

Definition

Overloads

Name Description
GetCachedJniType(JniType, ReadOnlySpan<Byte>)

Gets a cached Java class wrapper, initializing an empty cache when needed.

GetCachedJniType(JniType, String)

Gets a cached Java class wrapper, initializing an empty cache when needed.

GetCachedJniType(JniType, ReadOnlySpan<Byte>)

Gets a cached Java class wrapper, initializing an empty cache when needed.

public static Java.Interop.JniType GetCachedJniType(ref Java.Interop.JniType? cachedType, ReadOnlySpan<byte> classname);
static member GetCachedJniType : JniType * ReadOnlySpan<byte> -> Java.Interop.JniType

Parameters

cachedType
JniType

The cache location for this exact class. Initialize it to null and do not leave a disposed wrapper in it.

classname
ReadOnlySpan<Byte>

The JNI class-name bytes, with a null terminator available to native code.

Returns

The existing valid wrapper, or the wrapper installed in an empty cache.

Remarks

A newly installed wrapper is registered for runtime cleanup. The class name is not rechecked for an existing valid cached wrapper.

Applies to

GetCachedJniType(JniType, String)

Gets a cached Java class wrapper, initializing an empty cache when needed.

public static Java.Interop.JniType GetCachedJniType(ref Java.Interop.JniType? cachedType, string classname);
static member GetCachedJniType : JniType * string -> Java.Interop.JniType

Parameters

cachedType
JniType

The cache location for this exact class. Initialize it to null and do not leave a disposed wrapper in it.

classname
String

The class name to resolve.

Returns

The existing valid wrapper, or the wrapper installed in an empty cache.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to