@Documented
@Retention(value=CLASS)
@Target(value={PACKAGE,TYPE,METHOD,CONSTRUCTOR})
public @interface NonNullByDefault
@NonNull
. Entities affected by
@NonNullByDefault
are:
@NonNullByDefault
annotation with the argument false
,
a default from any enclosing scope can be canceled for the element being annotated.
@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()
).package-info.java
is used.Modifier and Type | Optional Element and Description |
---|---|
boolean |
value
When parameterized with
false , the annotation specifies that the current element should not apply
any default to un-annotated types. |