Language

VarHandle.Set(Object[]) Method

Definition

Sets the value of a variable to the newValue, with memory semantics of setting as if the variable was declared non-volatile and non-final.

[Android.Runtime.Register("set", "([Ljava/lang/Object;)V", "", ApiSince=33)]
public void Set(params Java.Lang.Object[]? args);
[<Android.Runtime.Register("set", "([Ljava/lang/Object;)V", "", ApiSince=33)>]
member this.Set : Java.Lang.Object[] -> unit

Parameters

args
Object[]

the signature-polymorphic parameter list of the form (CT1 ct1,..., CTn ctn, T newValue), statically represented using varargs.

Attributes

Remarks

Sets the value of a variable to the newValue, with memory semantics of setting as if the variable was declared non-volatile and non-final. Commonly referred to as plain write access. The method signature is of the form (CT1 ct1,..., CTn ctn, T newValue)void. The symbolic type descriptor at the call site of set must match the access mode type that is the result of calling accessModeType(VarHandle.AccessMode.SET) on this VarHandle.

Java reference for java.lang.invoke.VarHandle.set.

Applies to