GuardedBy
public
abstract
@interface
GuardedBy
implements
Annotation
android.support.annotation.GuardedBy |
Denotes that the annotated method or field can only be accessed when holding the referenced lock.
Example:
final Object objectLock = new Object(); @GuardedBy("objectLock") volatile Object object; Object getObject() { synchronized (objectLock) { if (object == null) { object = new Object(); } } return object; }
Summary
Public methods | |
---|---|
String
|
value()
|
Public methods
value
String value ()
Returns | |
---|---|
String |
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