Package jakarta.validation.constraints
Annotation Interface NotNull
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Documented
@Constraint(validatedBy={})
public @interface NotNull
The annotated element must not be
null
.
Accepts any type.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Defines severalNotNull
annotations on the same element. -
Optional Element Summary