/* * Copyright (c) 2005 Brian Goetz * Released under the Creative Commons Attribution License * (http://creativecommons.org/licenses/by/2.5) * Official home: http://www.jcip.net */ package javax.annotation.concurrent; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * The field or method to which this annotation is applied can only be accessed * when holding a particular lock, which may be a built-in (synchronization) * lock, or may be an explicit {@link java.util.concurrent.locks.Lock}. *

* The argument determines which lock guards the annotated field or method: *

*/ @Target({ ElementType.FIELD, ElementType.METHOD }) @Retention(RetentionPolicy.CLASS) public @interface GuardedBy { String value(); }