ClassValue.Get(Class) 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.
Returns the value for the given class.
[Android.Runtime.Register("get", "(Ljava/lang/Class;)Ljava/lang/Object;", "GetGet_Ljava_lang_Class_Handler", ApiSince=34)]
public virtual Java.Lang.Object? Get (Java.Lang.Class? type);
[<Android.Runtime.Register("get", "(Ljava/lang/Class;)Ljava/lang/Object;", "GetGet_Ljava_lang_Class_Handler", ApiSince=34)>]
abstract member Get : Java.Lang.Class -> Java.Lang.Object
override this.Get : Java.Lang.Class -> Java.Lang.Object
Parameters
- type
- Class
the type whose class value must be computed or retrieved
Returns
the current value associated with this ClassValue
, for the given class or interface
- Attributes
Remarks
Returns the value for the given class. If no value has yet been computed, it is obtained by an invocation of the #computeValue computeValue
method.
The actual installation of the value on the class is performed atomically. At that point, if several racing threads have computed values, one is chosen, and returned to all the racing threads.
The type
parameter is typically a class, but it may be any type, such as an interface, a primitive type (like int.class
), or void.class
.
In the absence of remove
calls, a class value has a simple state diagram: uninitialized and initialized. When remove
calls are made, the rules for value observation are more complex. See the documentation for #remove remove
for more information.
Java documentation for java.lang.ClassValue.get(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.