Top Description Constructors Methods
org.hibernate.validator.internal.constraintvalidators.bv

public Class NotNullValidator

extends Object
implements ConstraintValidator<NotNull, Object>
Class Inheritance
All Implemented Interfaces
jakarta.validation.ConstraintValidator
Imports
jakarta.validation.ConstraintValidator, .ConstraintValidatorContext, jakarta.validation.constraints.NotNull

Validate that the object is not null.
Author
Emmanuel Bernard

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isValid(Object
object to validate
object
,
ConstraintValidatorContext
context in which the constraint is evaluated
constraintValidatorContext
)

Implements jakarta.validation.ConstraintValidator.isValid.

Implements the validation logic.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NotNullValidatorback to summary
public NotNullValidator()

Method Detail

isValidback to summary
public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext)

Implements jakarta.validation.ConstraintValidator.isValid.

Doc from jakarta.validation.ConstraintValidator.isValid.

Implements the validation logic. The state of value must not be altered.

This method can be accessed concurrently, thread-safety must be ensured by the implementation.

Parameters
object:Object

object to validate

constraintValidatorContext:ConstraintValidatorContext

context in which the constraint is evaluated

Returns:boolean

false if value does not pass the constraint

Annotations
@Override