A
- The annotation type represented by this context.public interface ConstraintDefinitionContext<A extends Annotation> extends ConstraintMappingTarget
Modifier and Type | Interface and Description |
---|---|
static interface |
ConstraintDefinitionContext.ConstraintValidatorDefinitionContext<A extends Annotation,T>
Allows to specify a validation implementation for the given constraint and data type using a Lambda expression or
method reference.
|
static interface |
ConstraintDefinitionContext.ValidationCallable<T>
Callable implementing a validation routine.
|
Modifier and Type | Method and Description |
---|---|
ConstraintDefinitionContext<A> |
includeExistingValidators(boolean includeExistingValidators)
Specifies whether validators already mapped to this constraint (i.e.
|
ConstraintDefinitionContext<A> |
validatedBy(Class<? extends ConstraintValidator<A,?>> validator)
Adds a new validator to validate this constraint.
|
<T> ConstraintDefinitionContext.ConstraintValidatorDefinitionContext<A,T> |
validateType(Class<T> type)
Allows to configure a validation implementation using a Lambda expression or method reference.
|
type
constraintDefinition
ConstraintDefinitionContext<A> includeExistingValidators(boolean includeExistingValidators)
Constraint.validatedBy()
or the validation engine defaults) should
be included or not.includeExistingValidators
- Whether or not to use already-mapped validators when validating this constraint.ConstraintDefinitionContext<A> validatedBy(Class<? extends ConstraintValidator<A,?>> validator)
validator
- The validator to add.@Incubating <T> ConstraintDefinitionContext.ConstraintValidatorDefinitionContext<A,T> validateType(Class<T> type)
type
- The type of the value to validateCopyright © 2021 JBoss by Red Hat. All rights reserved.