01 October 2008

Some interesting new java annotations in JSR 305

java.net: The Open Road: javax.annotation

Covering annotations such as:

Nulls
@Nonnull
@CheckForNull
@Nullable

Concurrency
@Immutable
@ThreadSafe
@NotThreadSafe
@GuardedBy

Preconditions
@CheckForSigned
@Signed
@Nonnegative
@MatchesPattern
@Syntax

Usage
@OverridingMethodsMustInvokeSuper
@CheckReturnValue

IO
@WillClose
@WillNotClose
@WillCloseWhenClosed