Condividi tramite


ClassValue.ComputeValue(Class) Method

Definition

Computes the given class's derived value for this ClassValue.

[Android.Runtime.Register("computeValue", "(Ljava/lang/Class;)Ljava/lang/Object;", "GetComputeValue_Ljava_lang_Class_Handler", ApiSince=34)]
protected abstract Java.Lang.Object? ComputeValue (Java.Lang.Class? type);
[<Android.Runtime.Register("computeValue", "(Ljava/lang/Class;)Ljava/lang/Object;", "GetComputeValue_Ljava_lang_Class_Handler", ApiSince=34)>]
abstract member ComputeValue : Java.Lang.Class -> Java.Lang.Object

Parameters

type
Class

the type whose class value must be computed

Returns

the newly computed value associated with this ClassValue, for the given class or interface

Attributes

Remarks

Computes the given class's derived value for this ClassValue.

This method will be invoked within the first thread that accesses the value with the #get get method.

Normally, this method is invoked at most once per class, but it may be invoked again if there has been a call to #remove remove.

If this method throws an exception, the corresponding call to get will terminate abnormally with that exception, and no class value will be recorded.

Java documentation for java.lang.ClassValue.computeValue(java.lang.Class<?>).

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