Language

JNIEnv.AllocObject Method

Definition

Overloads

Name Description
AllocObject(IntPtr)

Creates a Java object but does not call its constructor.

AllocObject(String)

Creates a Java object but does not call its constructor.

AllocObject(Type)

Creates a Java object but does not call its constructor.

AllocObject(IntPtr)

Creates a Java object but does not call its constructor.

public static IntPtr AllocObject(IntPtr jclass);
static member AllocObject : nativeint -> nativeint

Parameters

jclass
IntPtr

nativeint

A live JNI class reference for an allocatable class in the current VM. It must remain usable on the calling thread during the call.

Returns

IntPtr

nativeint

A local JNI reference to the object, or Zero if allocation returns null.

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

AllocObject(String)

Creates a Java object but does not call its constructor.

public static IntPtr AllocObject(string jniClassName);
static member AllocObject : string -> nativeint

Parameters

jniClassName
String

The JNI name used to find the class to allocate.

Returns

IntPtr

nativeint

A local JNI reference to the object, or Zero if allocation returns null.

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

AllocObject(Type)

Creates a Java object but does not call its constructor.

public static IntPtr AllocObject(Type type);
static member AllocObject : Type -> nativeint

Parameters

type
Type

The managed type used to find the Java class to allocate.

Returns

IntPtr

nativeint

A local JNI reference to the object, or Zero if allocation returns null.

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