AnyThread
public
abstract
@interface
AnyThread
implements
Annotation
android.support.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
Inherited methods | |
---|---|
From
interface
java.lang.annotation.Annotation
|
Annotations
- AnimatorRes
- AnimRes
- AnyRes
- AnyThread
- ArrayRes
- AttrRes
- BinderThread
- BoolRes
- CallSuper
- CheckResult
- ColorInt
- ColorLong
- ColorRes
- DimenRes
- Dimension
- DrawableRes
- FloatRange
- FontRes
- FractionRes
- GuardedBy
- HalfFloat
- IdRes
- IntDef
- IntegerRes
- InterpolatorRes
- IntRange
- Keep
- LayoutRes
- LongDef
- MainThread
- MenuRes
- NavigationRes
- NonNull
- Nullable
- PluralsRes
- Px
- RawRes
- RequiresApi
- RequiresPermission
- RequiresPermission.Read
- RequiresPermission.Write
- RestrictTo
- Size
- StringDef
- StringRes
- StyleableRes
- StyleRes
- TransitionRes
- UiThread
- VisibleForTesting
- WorkerThread
- XmlRes
Enums