Language

JNIEnv.CallStaticObjectMethod Method

Definition

Overloads

Name Description
CallStaticObjectMethod(IntPtr, IntPtr)

Calls a Java static method that returns an object reference.

CallStaticObjectMethod(IntPtr, IntPtr, JValue*)

Calls a Java static method that returns an object reference.

CallStaticObjectMethod(IntPtr, IntPtr, JValue[])

Calls a Java static method that returns an object reference.

CallStaticObjectMethod(IntPtr, IntPtr)

Calls a Java static method that returns an object reference.

public static IntPtr CallStaticObjectMethod(IntPtr jclass, IntPtr jmethod);
static member CallStaticObjectMethod : nativeint * nativeint -> nativeint

Parameters

jclass
IntPtr

nativeint

A live, non-null JNI class reference from the current VM, usable on the calling thread until the call returns or throws.

jmethod
IntPtr

nativeint

A live static method ID obtained for jclass. Its JNI signature must take no arguments and return an object reference. Keep its declaring class live.

Returns

IntPtr

nativeint

A local JNI reference to the returned object, or Zero if the method returns null. A nonzero local reference is valid only on its creating thread and may be released with DeleteLocalRef(IntPtr).

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

CallStaticObjectMethod(IntPtr, IntPtr, JValue*)

Calls a Java static method that returns an object reference.

public static IntPtr CallStaticObjectMethod(IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms);
static member CallStaticObjectMethod : nativeint * nativeint * nativeptr<Android.Runtime.JValue> -> nativeint

Parameters

jclass
IntPtr

nativeint

A live, non-null JNI class reference from the current VM, usable on the calling thread until the call returns or throws.

jmethod
IntPtr

nativeint

A live static method ID obtained for jclass. Its JNI signature must match the arguments and return an object reference. Keep its declaring class live.

parms
JValue*

A pointer to the arguments in JNI order and types. The storage must be readable for the argument count. Do not change the storage during the call, and keep referenced objects live.

Returns

IntPtr

nativeint

A local JNI reference to the returned object, or Zero if the method returns null. A nonzero local reference is valid only on its creating thread and may be released with DeleteLocalRef(IntPtr).

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

CallStaticObjectMethod(IntPtr, IntPtr, JValue[])

Calls a Java static method that returns an object reference.

public static IntPtr CallStaticObjectMethod(IntPtr jclass, IntPtr jmethod, params Android.Runtime.JValue[] parms);
static member CallStaticObjectMethod : nativeint * nativeint * Android.Runtime.JValue[] -> nativeint

Parameters

jclass
IntPtr

nativeint

A live, non-null JNI class reference from the current VM, usable on the calling thread until the call returns or throws.

jmethod
IntPtr

nativeint

A live static method ID obtained for jclass. Its JNI signature must match the arguments and return an object reference. Keep its declaring class live.

parms
JValue[]

All arguments in JNI order and types. Do not change the array during the call, and keep referenced objects live.

Returns

IntPtr

nativeint

A local JNI reference to the returned object, or Zero if the method returns null. A nonzero local reference is valid only on its creating thread and may be released with DeleteLocalRef(IntPtr).

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