We've used annotations such as
@ThreadSafe to show how thread-safety promises and synchronization policies can be documented. This appendix documents these annotations; their source code can be downloaded from this book's website. (There are, of course, additional thread-safety promises and implementation details that should be documented but that are not captured by this minimal set of annotations.)
We use three class-level annotations to describe a class's intended thread-safety promises:
@Immutable means, of course, that the class is immutable, and implies
@NotThreadSafe is optional—if a class is not annotated ...