Interface JacksonCheckIf
- All Known Subinterfaces:
JacksonValidators
public interface JacksonCheckIf
Creates validators for the Jackson API that capture exceptions on validation failure rather than throwing
them immediately.
-
Method Summary
Modifier and TypeMethodDescription<T extends JsonNode>
JsonNodeValidator<T> checkIf
(T value) Validates the state of aJsonNode
.<T extends JsonNode>
JsonNodeValidator<T> Validates the state of aJsonNode
.
-
Method Details
-
checkIf
Validates the state of aJsonNode
.The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.
- Type Parameters:
T
- the type of theJsonNode
- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace, or is empty
-
checkIf
Validates the state of aJsonNode
.The returned validator captures exceptions on validation failure rather than throwing them immediately. These exceptions can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.
- Type Parameters:
T
- the type of theJsonNode
- Parameters:
value
- the value- Returns:
- a validator for the value
-