Teanga

VarHandle.GetVolatile(Object[]) Method

Definition

Returns the value of a variable, with memory semantics of reading as if the variable was declared volatile.

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

Parameters

args
Object[]

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

Returns

This method does not return a value. A JNI call to an access mode method throws an exception.

Attributes

Remarks

This managed method calls the Java access mode method through JNI. The Java VarHandle documentation states that a JNI call to an access mode method ignores its argument and throws UnsupportedOperationException. Thus, this method does not do the access that the next paragraph describes.

Returns the value of a variable, with memory semantics of reading as if the variable was declared volatile. The method signature is of the form (CT1 ct1,..., CTn ctn)T. The symbolic type descriptor at the call site of getVolatile must match the access mode type that is the result of calling accessModeType(VarHandle.AccessMode.GET_VOLATILE) on this VarHandle.

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

Applies to