JNIEnv.CreateInstance 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 |
|---|---|
| CreateInstance(IntPtr, String, JValue*) |
Creates a Java object and calls the selected constructor. |
| CreateInstance(IntPtr, String, JValue[]) |
Creates a Java object and calls the selected constructor. |
| CreateInstance(String, String, JValue*) |
Creates a Java object and calls the selected constructor. |
| CreateInstance(String, String, JValue[]) |
Creates a Java object and calls the selected constructor. |
| CreateInstance(Type, String, JValue*) |
Creates a Java object and calls the selected constructor. |
| CreateInstance(Type, String, JValue[]) |
Creates a Java object and calls the selected constructor. |
CreateInstance(IntPtr, String, JValue*)
Creates a Java object and calls the selected constructor.
public static IntPtr CreateInstance(IntPtr jniClass, string signature, Android.Runtime.JValue* constructorParameters);
static member CreateInstance : nativeint * string * nativeptr<Android.Runtime.JValue> -> nativeint
Parameters
- jniClass
-
IntPtr
nativeint
A live JNI class reference that is not an array class. It must remain usable on the calling thread during the call.
- signature
- String
The JNI signature of a void-returning constructor that matches the arguments.
- constructorParameters
- JValue*
A pointer to the constructor arguments in JNI order and types. The storage and referenced objects must remain valid during the call.
Returns
nativeint
A local JNI reference to the object, or Zero if creation 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
CreateInstance(IntPtr, String, JValue[])
Creates a Java object and calls the selected constructor.
public static IntPtr CreateInstance(IntPtr jniClass, string signature, params Android.Runtime.JValue[] constructorParameters);
static member CreateInstance : nativeint * string * Android.Runtime.JValue[] -> nativeint
Parameters
- jniClass
-
IntPtr
nativeint
A live JNI class reference that is not an array class. It must remain usable on the calling thread during the call.
- signature
- String
The JNI signature of a void-returning constructor that matches the arguments.
- constructorParameters
- JValue[]
The constructor arguments in JNI order and types. Referenced objects must remain valid during the call.
Returns
nativeint
A local JNI reference to the object, or Zero if creation 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
CreateInstance(String, String, JValue*)
Creates a Java object and calls the selected constructor.
public static IntPtr CreateInstance(string jniClassName, string signature, Android.Runtime.JValue* constructorParameters);
static member CreateInstance : string * string * nativeptr<Android.Runtime.JValue> -> nativeint
Parameters
- jniClassName
- String
The JNI name used to find the class to create. The class must not be an array class.
- signature
- String
The JNI signature of a void-returning constructor that matches the arguments.
- constructorParameters
- JValue*
A pointer to the constructor arguments in JNI order and types. The storage and referenced objects must remain valid during the call.
Returns
nativeint
A local JNI reference to the object, or Zero if creation 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
CreateInstance(String, String, JValue[])
Creates a Java object and calls the selected constructor.
public static IntPtr CreateInstance(string jniClassName, string signature, params Android.Runtime.JValue[] constructorParameters);
static member CreateInstance : string * string * Android.Runtime.JValue[] -> nativeint
Parameters
- jniClassName
- String
The JNI name used to find the class to create. The class must not be an array class.
- signature
- String
The JNI signature of a void-returning constructor that matches the arguments.
- constructorParameters
- JValue[]
The constructor arguments in JNI order and types. Referenced objects must remain valid during the call.
Returns
nativeint
A local JNI reference to the object, or Zero if creation 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
CreateInstance(Type, String, JValue*)
Creates a Java object and calls the selected constructor.
public static IntPtr CreateInstance(Type type, string signature, Android.Runtime.JValue* constructorParameters);
static member CreateInstance : Type * string * nativeptr<Android.Runtime.JValue> -> nativeint
Parameters
- type
- Type
The managed type used to find the Java class to create. The Java class must not be an array class.
- signature
- String
The JNI signature of a void-returning constructor that matches the arguments.
- constructorParameters
- JValue*
A pointer to the constructor arguments in JNI order and types. The storage and referenced objects must remain valid during the call.
Returns
nativeint
A local JNI reference to the object, or Zero if creation 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
CreateInstance(Type, String, JValue[])
Creates a Java object and calls the selected constructor.
public static IntPtr CreateInstance(Type type, string signature, params Android.Runtime.JValue[] constructorParameters);
static member CreateInstance : Type * string * Android.Runtime.JValue[] -> nativeint
Parameters
- type
- Type
The managed type used to find the Java class to create. The Java class must not be an array class.
- signature
- String
The JNI signature of a void-returning constructor that matches the arguments.
- constructorParameters
- JValue[]
The constructor arguments in JNI order and types. Referenced objects must remain valid during the call.
Returns
nativeint
A local JNI reference to the object, or Zero if creation 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.