Package org.eclipse.jdt.annotation
Annotation Type Nullable
-
@Documented @Retention(CLASS) @Target(TYPE_USE) public @interface Nullable
Qualifier for a reference type in aTYPE_USEposition: The type that has this annotation explicitly includes the valuenull.If annotation based null analysis is enabled using this annotation has two consequences:
- Binding a
nullvalue to an entity (field, local variable, method parameter or method return value) of this type is legal. - Dereferencing an expression of this type is unsafe, i.e., a
NullPointerExceptioncan occur at runtime.
Note: Since org.eclipse.jdt.annotation 2.0.0, the
@Targetis{TYPE_USE}. For the old API, see@Nullablein 1.1.0.- Since:
- 1.0
- Binding a