JNIEnv.SetStaticField 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 |
|---|---|
| SetStaticField(IntPtr, IntPtr, Single) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, SByte) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, IntPtr) |
Sets a Java reference-valued static field. |
| SetStaticField(IntPtr, IntPtr, Int64) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, Int16) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, Double) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, Char) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, Boolean) |
Sets a Java |
| SetStaticField(IntPtr, IntPtr, Int32) |
Sets a Java |
SetStaticField(IntPtr, IntPtr, Single)
Sets a Java float static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, float val);
static member SetStaticField : nativeint * nativeint * single -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, SByte)
Sets a Java byte static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, sbyte val);
static member SetStaticField : nativeint * nativeint * sbyte -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, IntPtr)
Sets a Java reference-valued static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, IntPtr val);
static member SetStaticField : nativeint * nativeint * nativeint -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, Int64)
Sets a Java long static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, long val);
static member SetStaticField : nativeint * nativeint * int64 -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, Int16)
Sets a Java short static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, short val);
static member SetStaticField : nativeint * nativeint * int16 -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, Double)
Sets a Java double static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, double val);
static member SetStaticField : nativeint * nativeint * double -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, Char)
Sets a Java char static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, char val);
static member SetStaticField : nativeint * nativeint * char -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, Boolean)
Sets a Java boolean static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, bool val);
static member SetStaticField : nativeint * nativeint * bool -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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
SetStaticField(IntPtr, IntPtr, Int32)
Sets a Java int static field.
public static void SetStaticField(IntPtr jclass, IntPtr jfieldID, int val);
static member SetStaticField : nativeint * nativeint * int -> unit
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.
- jfieldID
-
IntPtr
nativeint
A live static field ID applicable to jclass 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.