@Documented @Retention(value=CLASS) @Target(value={PACKAGE,TYPE,METHOD,CONSTRUCTOR,FIELD,LOCAL_VARIABLE}) public @interface NonNullByDefault
@NonNull
.
PACKAGE
, TYPE
,
METHOD
, CONSTRUCTOR
,
FIELD
, LOCAL_VARIABLE
.value()
, specifying what
kinds of locations within the given declaration will be affected. See DefaultLocation
for the meaning of the available values.{}
) for the value()
attribute has the effect of canceling any null defaults that might be defined for any
enclosing scope.
Note that for applying an annotation to a package, a file by the name
package-info.java
is used.
Note: Since org.eclipse.jdt.annotation 2.0.0, this annotation also applies to field and local variable declarations.
For the old API, see
@NonNullByDefault
in 1.1.0.
Modifier and Type | Optional Element and Description |
---|---|
DefaultLocation[] |
value
Specifies the set of locations within the annotated declaration that should be affected by the nonnull default.
|
public abstract DefaultLocation[] value
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.