JNIEnv.AllocObject Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
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
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.