Eclipse JDT
Release 3.8

org.eclipse.jdt.annotation
Annotation Type NonNullByDefault


@Documented
@Retention(value=CLASS)
@Target(value={PACKAGE,TYPE,METHOD,CONSTRUCTOR})
public @interface NonNullByDefault

This annotation can be applied to a package, type, method or constructor in order to define that contained entities for which a null annotation is otherwise lacking should be considered as @NonNull. Entities affected by @NonNullByDefault are:

Local variables are not affected.
Canceling a default
By using a @NonNullByDefault annotation with the argument false, a default from any enclosing scope can be canceled for the element being annotated.
Nested defaults
If a @NonNullByDefault annotation is used within the scope of another @NonNullByDefault annotation, the innermost annotation defines the default applicable at any given position (depending on the parameter value()).
Note that for applying an annotation to a package, a file by the name package-info.java is used.

Since:
1.0

Optional Element Summary
 boolean value
          When parameterized with false, the annotation specifies that the current element should not apply any default to un-annotated types.
 

value

public abstract boolean value
When parameterized with false, the annotation specifies that the current element should not apply any default to un-annotated types.

Default:
true

Eclipse JDT
Release 3.8

Guidelines for using Eclipse APIs.

Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.