Class ConstraintDescriptorImpl<T extends Annotation>
java.lang.Object
org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl<T>
- All Implemented Interfaces:
jakarta.validation.metadata.ConstraintDescriptor<T>
,Serializable
public class ConstraintDescriptorImpl<T extends Annotation>
extends Object
implements jakarta.validation.metadata.ConstraintDescriptor<T>, Serializable
Describes a single constraint (including its composing constraints).
- Author:
- Emmanuel Bernard, Hardy Ferentschik, Federico Mancini, Dag Hovland, Guillaume Smet
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The type of a constraint. -
Constructor Summary
ConstructorsConstructorDescriptionConstraintDescriptorImpl
(ConstraintHelper constraintHelper, Constrainable constrainable, ConstraintAnnotationDescriptor<T> annotationDescriptor, ConstraintLocation.ConstraintLocationKind constraintLocationKind) ConstraintDescriptorImpl
(ConstraintHelper constraintHelper, Constrainable constrainable, ConstraintAnnotationDescriptor<T> annotationDescriptor, ConstraintLocation.ConstraintLocationKind constraintLocationKind, Class<?> implicitGroup, ConstraintOrigin definedOn, ConstraintDescriptorImpl.ConstraintType externalConstraintType) ConstraintDescriptorImpl
(ConstraintHelper constraintHelper, Constrainable constrainable, ConstraintAnnotationDescriptor<T> annotationDescriptor, ConstraintLocation.ConstraintLocationKind constraintLocationKind, ConstraintDescriptorImpl.ConstraintType constraintType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Set<jakarta.validation.metadata.ConstraintDescriptor<?>>
Return all constraint validator descriptors (either generic or cross-parameter) which are registered for the constraint of this descriptor.jakarta.validation.ConstraintTarget
jakarta.validation.metadata.ValidateUnwrappedValue
int
hashCode()
boolean
toString()
<U> U
-
Constructor Details
-
ConstraintDescriptorImpl
public ConstraintDescriptorImpl(ConstraintHelper constraintHelper, Constrainable constrainable, ConstraintAnnotationDescriptor<T> annotationDescriptor, ConstraintLocation.ConstraintLocationKind constraintLocationKind, Class<?> implicitGroup, ConstraintOrigin definedOn, ConstraintDescriptorImpl.ConstraintType externalConstraintType) -
ConstraintDescriptorImpl
public ConstraintDescriptorImpl(ConstraintHelper constraintHelper, Constrainable constrainable, ConstraintAnnotationDescriptor<T> annotationDescriptor, ConstraintLocation.ConstraintLocationKind constraintLocationKind) -
ConstraintDescriptorImpl
public ConstraintDescriptorImpl(ConstraintHelper constraintHelper, Constrainable constrainable, ConstraintAnnotationDescriptor<T> annotationDescriptor, ConstraintLocation.ConstraintLocationKind constraintLocationKind, ConstraintDescriptorImpl.ConstraintType constraintType)
-
-
Method Details
-
getAnnotationDescriptor
-
getAnnotation
- Specified by:
getAnnotation
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getAnnotationType
-
getMessageTemplate
- Specified by:
getMessageTemplate
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getGroups
- Specified by:
getGroups
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getPayload
- Specified by:
getPayload
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getValidationAppliesTo
public jakarta.validation.ConstraintTarget getValidationAppliesTo()- Specified by:
getValidationAppliesTo
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getValueUnwrapping
public jakarta.validation.metadata.ValidateUnwrappedValue getValueUnwrapping()- Specified by:
getValueUnwrapping
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getConstraintValidatorClasses
public List<Class<? extends jakarta.validation.ConstraintValidator<T,?>>> getConstraintValidatorClasses()- Specified by:
getConstraintValidatorClasses
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getMatchingConstraintValidatorDescriptors
Return all constraint validator descriptors (either generic or cross-parameter) which are registered for the constraint of this descriptor.- Returns:
- The constraint validator descriptors applying to type of this constraint.
-
getAttributes
- Specified by:
getAttributes
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getComposingConstraints
- Specified by:
getComposingConstraints
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getComposingConstraintImpls
-
isReportAsSingleViolation
public boolean isReportAsSingleViolation()- Specified by:
isReportAsSingleViolation
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
getConstraintLocationKind
-
getDefinedOn
-
getConstraintType
-
unwrap
- Specified by:
unwrap
in interfacejakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
-
equals
-
hashCode
public int hashCode() -
toString
-
getCompositionType
- Returns:
- the compositionType
-