Language

JNIEnv.SetField Method

Definition

Overloads

Name Description
SetField(IntPtr, IntPtr, Boolean)

Sets a Java boolean instance field.

SetField(IntPtr, IntPtr, Char)

Sets a Java char instance field.

SetField(IntPtr, IntPtr, Double)

Sets a Java double instance field.

SetField(IntPtr, IntPtr, Int16)

Sets a Java short instance field.

SetField(IntPtr, IntPtr, Int32)

Sets a Java int instance field.

SetField(IntPtr, IntPtr, Int64)

Sets a Java long instance field.

SetField(IntPtr, IntPtr, IntPtr)

Sets a Java reference-valued instance field.

SetField(IntPtr, IntPtr, SByte)

Sets a Java byte instance field.

SetField(IntPtr, IntPtr, Single)

Sets a Java float instance field.

SetField(IntPtr, IntPtr, Boolean)

Sets a Java boolean instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, bool val);
static member SetField : nativeint * nativeint * bool -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type boolean. Keep its declaring class live.

val
Boolean

The new field value.

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

SetField(IntPtr, IntPtr, Char)

Sets a Java char instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, char val);
static member SetField : nativeint * nativeint * char -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type char. Keep its declaring class live.

val
Char

The new field value.

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

SetField(IntPtr, IntPtr, Double)

Sets a Java double instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, double val);
static member SetField : nativeint * nativeint * double -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type double. Keep its declaring class live.

val
Double

The new field value.

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

SetField(IntPtr, IntPtr, Int16)

Sets a Java short instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, short val);
static member SetField : nativeint * nativeint * int16 -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type short. Keep its declaring class live.

val
Int16

The new field value.

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

SetField(IntPtr, IntPtr, Int32)

Sets a Java int instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, int val);
static member SetField : nativeint * nativeint * int -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type int. Keep its declaring class live.

val
Int32

The new field value.

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

SetField(IntPtr, IntPtr, Int64)

Sets a Java long instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, long val);
static member SetField : nativeint * nativeint * int64 -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type long. Keep its declaring class live.

val
Int64

The new field value.

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

SetField(IntPtr, IntPtr, IntPtr)

Sets a Java reference-valued instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, IntPtr val);
static member SetField : nativeint * nativeint * nativeint -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject for a Java reference field. Keep its declaring class live.

val
IntPtr

nativeint

A live JNI object reference assignable to the field type and usable on the calling thread until the call returns or throws, or Zero.

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

SetField(IntPtr, IntPtr, SByte)

Sets a Java byte instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, sbyte val);
static member SetField : nativeint * nativeint * sbyte -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type byte. Keep its declaring class live.

val
SByte

The new field value.

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

SetField(IntPtr, IntPtr, Single)

Sets a Java float instance field.

public static void SetField(IntPtr jobject, IntPtr jfieldID, float val);
static member SetField : nativeint * nativeint * single -> unit

Parameters

jobject
IntPtr

nativeint

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

jfieldID
IntPtr

nativeint

A live instance field ID applicable to jobject with Java type float. Keep its declaring class live.

val
Single

The new field value.

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