Udostępnij za pośrednictwem


MethodHandles.ArrayElementGetter(Class) Method

Definition

Produces a method handle giving read access to elements of an array.

[Android.Runtime.Register("arrayElementGetter", "(Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)]
public static Java.Lang.Invoke.MethodHandle? ArrayElementGetter (Java.Lang.Class? arrayClass);
[<Android.Runtime.Register("arrayElementGetter", "(Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;", "", ApiSince=26)>]
static member ArrayElementGetter : Java.Lang.Class -> Java.Lang.Invoke.MethodHandle

Parameters

arrayClass
Class

an array type

Returns

a method handle which can load values from the given array type

Attributes

Remarks

Produces a method handle giving read access to elements of an array. The type of the method handle will have a return type of the array's element type. Its first argument will be the array type, and the second will be int.

Java documentation for java.lang.invoke.MethodHandles.arrayElementGetter(java.lang.Class<?>).

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