KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > annotations > GuardedBy


1 package org.jgroups.annotations;
2
3 import java.lang.annotation.ElementType JavaDoc;
4 import java.lang.annotation.Retention JavaDoc;
5 import java.lang.annotation.RetentionPolicy JavaDoc;
6 import java.lang.annotation.Target JavaDoc;
7
8 /**
9  * Copyright (c) 2005 Brian Goetz and Tim Peierls
10  * Released under the Creative Commons Attribution License
11  * (http://creativecommons.org/licenses/by/2.5)
12  * Official home: http://www.jcip.net
13  *
14  * Adopted from Java Concurrency in Practice. This annotation defines the monitor that protects the variable
15  * annotated by @GuardedBy, e.g. @GuardedBy("lock") or @GuardedBy("this")
16  * @author Bela Ban
17  * @version $Id: GuardedBy.java,v 1.3 2007/02/27 14:49:40 belaban Exp $
18  */

19 @Target JavaDoc({ElementType.FIELD, ElementType.METHOD})
20 @Retention JavaDoc(RetentionPolicy.SOURCE)
21 public @interface GuardedBy {
22     String JavaDoc value();
23 }
24
Popular Tags