AnyThread
class AnyThread
androidx.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 | |
---|---|
<init>() Denotes that the annotated method can be called from any thread (e. |
Public constructors
<init>
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) { ... }
Enums
Annotations
- DimenRes
- StringRes
- GuardedBy
- FloatRange
- DrawableRes
- AttrRes
- StyleRes
- ArrayRes
- WorkerThread
- XmlRes
- LayoutRes
- RequiresApi
- NavigationRes
- AnimatorRes
- MenuRes
- IntRange
- StyleableRes
- RequiresPermission
- RequiresPermission.Read
- RequiresPermission.Write
- Px
- ColorLong
- NonNull
- BinderThread
- FontRes
- ColorInt
- AnyThread
- IntegerRes
- PluralsRes
- RawRes
- BoolRes
- FractionRes
- VisibleForTesting
- UiThread
- RestrictTo
- InterpolatorRes
- StringDef
- AnyRes
- LongDef
- Dimension
- AnimRes
- Size
- IdRes
- TransitionRes
- IntDef
- ColorRes
- MainThread
- HalfFloat
- CheckResult
- CallSuper
- Keep
- RequiresFeature
- Nullable