Annotation Type GuardedBy

public @interface GuardedBy

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 java.util.concurrent.Lock.

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

Based on code developed by Brian Goetz and Tim Peierls and concepts published in 'Java Concurrency in Practice' by Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes and Doug Lea.

Required Element Summary
 String value

Element Detail


public abstract String value

Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.