KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > jcip > annotations > ThreadSafe


1 package net.jcip.annotations;
2 import java.lang.annotation.*;
3 /*
4  * Copyright (c) 2005 Brian Goetz
5  * Released under the Creative Commons Attribution License
6  * (http://creativecommons.org/licenses/by/2.5)
7  * Official home: http://www.jcip.net
8  */

9
10 /**
11  * ThreadSafe
12  *
13  * The class to which this annotation is applied is thread-safe. This means that
14  * no sequences of accesses (reads and writes to public fields, calls to public methods)
15  * may put the object into an invalid state, regardless of the interleaving of those actions
16  * by the runtime, and without requiring any additional synchronization or coordination on the
17  * part of the caller.
18  */

19 @Documented
20 @Target(ElementType.TYPE)
21 @Retention(RetentionPolicy.CLASS)
22 public @interface ThreadSafe {
23 }
24
Popular Tags