@Target(value={FIELD,METHOD})
@Retention(value=SOURCE)
public @interface GuardedBy
Adopted from Java Concurrency in Practice. This annotation defines the monitor that protects the variable annotated by @GuardedBy, e.g. @GuardedBy("lock") or @GuardedBy("this")
限定符和类型 | 必需的元素和说明 |
---|---|
java.lang.String |
value |