AnyThread


@MustBeDocumented
@Retention(value = AnnotationRetention.BINARY)
@Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS, AnnotationTarget.VALUE_PARAMETER])
public annotation AnyThread


Denotes that the annotated method can be called from any thread (e.g. it is "thread safe".) If the annotated element is a class, then all methods in the class can be called from any thread.

The main purpose of this method is to indicate that you believe a method can be called from any thread; static tools can then check that nothing you call from within this method or class have more strict threading requirements.

Example:

@AnyThread
public
void deliverResult(D data) { ... }

Summary

Public constructors

Public constructors

AnyThread

public AnyThread()

Develop your UI on Android.

Updated Dec 7, 2024

Develop your UI on Android.

Updated Feb 22, 2024

Develop your UI on Android.

Updated Dec 7, 2024