@Documented
@Retention(value=RUNTIME)
@Target(value={FIELD,LOCAL_VARIABLE,PARAMETER,METHOD})
public @interface NotNull
This annotation type is used to indicate that the associated field, local
variable, method or constructor parameter, or method return value is not
allowed to be null
. This annotation type is not strictly enforced by
the compiler, but development environments may be configured to warn or
reject attempts to use null
values where non-null
values are
expected.
This annotation type will appear in the generated Javadoc documentation for
classes and interfaces that include it.
- See Also:
Nullable