Top Annotations
[default module]

Package javax.annotation


Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
CheckForNull

The annotated element might be null, and uses of the element should check for null.

public @interface
CheckForSigned

Used to annotate a value that may be either negative or nonnegative, and indicates that uses of it should check for negative values before using it in a way that requires the value to be nonnegative, and check for it being nonnegative before using it in a way that requires it to be negative.

public @interface
CheckReturnValue

This annotation is used to denote a method whose return value should always be checked after invoking the method.

public @interface
public @interface
MatchesPattern

This annotation is used to denote String values that should always match given pattern.

public @interface
Nonnegative

This annotation is used to annotate a value that should only contain nonnegative values.

public @interface
Nonnull

The annotated element must not be null.

public @interface
Nullable

The annotated element could be null under some circumstances.

public @interface
OverridingMethodsMustInvokeSuper

When this annotation is applied to a method, it indicates that if this method is overridden in a subclass, the overriding method should invoke this method (through method invocation on super).

public @interface
ParametersAreNonnullByDefault

This annotation can be applied to a package, class or method to indicate that the method parameters in that element are nonnull by default unless there is:

  • An explicit nullness annotation
  • The method overrides a method in a superclass (in which case the annotation of the corresponding parameter in the superclass applies)
  • There is a default parameter annotation (like ParametersAreNullableByDefault) applied to a more tightly nested element.
public @interface
ParametersAreNullableByDefault

This annotation can be applied to a package, class or method to indicate that the method parameters in that element are nullable by default unless there is:

  • An explicit nullness annotation
  • The method overrides a method in a superclass (in which case the annotation of the corresponding parameter in the superclass applies)
  • There is a default parameter annotation applied to a more tightly nested element.
public @interface
public @interface
RegEx

This qualifier is used to denote String values that should be a Regular expression.

public @interface
Signed

Used to annotate a value of unknown sign.

public @interface
Syntax

This annotation a value that is of a particular syntax, such as Java syntax or regular expression syntax.

public @interface
Tainted

This annotation is used to denote String values that are tainted, i.e. may come from untrusted sources without proper validation.

public @interface
Untainted

This annotation is used to denote String values that are untainted, i.e. properly validated.

public @interface
WillClose

Used to annotate a method parameter to indicate that this method will close the resource.

public @interface
WillCloseWhenClosed

Used to annotate a constructor/factory parameter to indicate that returned object (X) will close the resource when X is closed.

public @interface
WillNotClose

Used to annotate a method parameter to indicate that this method will not close the resource.