T
- the constraint's annotation typepublic interface ConstraintDescriptor<T extends java.lang.annotation.Annotation>
Modifier and Type | Method and Description |
---|---|
T |
getAnnotation()
Returns the annotation describing the constraint declaration.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns a map containing the annotation attribute names as keys and the
annotation attribute values as value.
|
java.util.Set<ConstraintDescriptor<?>> |
getComposingConstraints()
Return a set of composing
ConstraintDescriptor s where each
descriptor describes a composing constraint. |
java.util.List<java.lang.Class<? extends ConstraintValidator<T,?>>> |
getConstraintValidatorClasses()
List of the constraint validation implementation classes.
|
java.util.Set<java.lang.Class<?>> |
getGroups()
The set of groups the constraint is applied on.
|
java.lang.String |
getMessageTemplate()
The non-interpolated error message
|
java.util.Set<java.lang.Class<? extends Payload>> |
getPayload()
The set of payload the constraint hosts.
|
ConstraintTarget |
getValidationAppliesTo()
|
ValidateUnwrappedValue |
getValueUnwrapping() |
boolean |
isReportAsSingleViolation() |
<U> U |
unwrap(java.lang.Class<U> type)
Returns an instance of the specified type allowing access to provider-specific APIs.
|
T getAnnotation()
java.lang.String getMessageTemplate()
java.util.Set<java.lang.Class<?>> getGroups()
Default
group is returned.java.util.Set<java.lang.Class<? extends Payload>> getPayload()
ConstraintTarget getValidationAppliesTo()
ConstraintTarget
value or null
java.util.List<java.lang.Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
java.util.Map<java.lang.String,java.lang.Object> getAttributes()
If this constraint is used as part of a composed constraint, attribute values are reflecting the overridden attribute of the composing constraint.
java.util.Set<ConstraintDescriptor<?>> getComposingConstraints()
ConstraintDescriptor
s where each
descriptor describes a composing constraint. ConstraintDescriptor
instances of composing constraints reflect overridden attribute values in
getAttributes()
and getAnnotation()
.ConstraintDescriptor
objects or an empty set
in case there are no composing constraintsboolean isReportAsSingleViolation()
true
if the constraint is annotated with ReportAsSingleViolation
ValidateUnwrappedValue getValueUnwrapping()
ValidateUnwrappedValue
describing the unwrapping behavior as given
via the Unwrapping
constraint payloads.<U> U unwrap(java.lang.Class<U> type)
If the Jakarta Bean Validation provider implementation does not support the specified class,
a ValidationException
is thrown.
U
- the type of the object to be returnedtype
- the class of the object to be returnedValidationException
- if the provider does not support the call