Language

JniEnvironment.Arrays.NewObjectArray Method

Definition

Allocates a Java object array and initializes every element to the supplied reference.

public static Java.Interop.JniObjectReference NewObjectArray(int length, Java.Interop.JniObjectReference elementClass, Java.Interop.JniObjectReference initialElement);
static member NewObjectArray : int * Java.Interop.JniObjectReference * Java.Interop.JniObjectReference -> Java.Interop.JniObjectReference

Parameters

length
Int32

The nonnegative number of elements.

elementClass
JniObjectReference

A valid reference to the Java element class.

initialElement
JniObjectReference

A compatible Java object reference for every initial element, or a zero handle for Java null.

Returns

A local JNI array reference, which the caller must release.

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