package waymaker.gen; // Copyright © 2005 Brian Goetz and Tim Peierls. Copyright © 2006 Michael Allan. Released under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.5). Official home: http://www.jcip.net. Any republication or derived work distributed in source code form must include this copyright and license notice. import java.lang.annotation.*; /** Indicates thread safety of fields, constructors and methods. Access to thread-safe fields and calls * to thread-safe constructors and methods will never put the program into an invalid state, regardless * of how the runtime interleaves those actions, and without requiring any additional synchronization * or coordination on the part of the caller. * *
The indication of thread safety applies to a member only, such as a field, constructor or method. * It never applies to any actual object read from the field, or created by the constructor, or * returned by the method. (Thread-safe members are not constrained to dispense only thread-safe * objects.) Each object’s own thread safety is specified by the API documentation of its type.
* *Nor does it guarantee the integrity of the parameters passed into the constructor or method. * Unless the API states otherwise, each actual parameter is expected to be ready for normal access * within the constructor or method body. Any preliminary locking or thread restriction is the * responsibility of the caller.
* *The opposite of ThreadSafe is {@linkplain ThreadRestricted ThreadRestricted}.
* *A final field must be thread safe. A volatile or {@linkplain * java.util.concurrent.atomic atomic} field might be. Any other field cannot be. * Use annotation to clarify any particular field whose thread safety is not obvious.
* *The thread safety of a call to a non-private constructor or method of an object o depends on type * T = o.getClass(). To determine the thread safety of the call:
* *Annotation of a class, interface or other type specifies the default thread safety * of all non-private constructors and methods of that type. This default specification * applies only to constructors and methods, not to fields or static member classes. * *
Some types are assumed to be thread safe. These include:
*