Class ConstraintDescriptorImpl<T extends Annotation>
java.lang.Object
org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl<T>
- All Implemented Interfaces:
ConstraintDescriptor<T>
,Serializable
public class ConstraintDescriptorImpl<T extends Annotation>
extends Object
implements 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
Modifier and TypeClassDescriptionstatic enum
The type of a constraint. -
Constructor Summary
ConstructorDescriptionConstraintDescriptorImpl
(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
-
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 interfaceConstraintDescriptor<T extends Annotation>
-
getAnnotationType
-
getMessageTemplate
- Specified by:
getMessageTemplate
in interfaceConstraintDescriptor<T extends Annotation>
-
getGroups
- Specified by:
getGroups
in interfaceConstraintDescriptor<T extends Annotation>
-
getPayload
- Specified by:
getPayload
in interfaceConstraintDescriptor<T extends Annotation>
-
getValidationAppliesTo
- Specified by:
getValidationAppliesTo
in interfaceConstraintDescriptor<T extends Annotation>
-
getValueUnwrapping
- Specified by:
getValueUnwrapping
in interfaceConstraintDescriptor<T extends Annotation>
-
getConstraintValidatorClasses
- Specified by:
getConstraintValidatorClasses
in interfaceConstraintDescriptor<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 interfaceConstraintDescriptor<T extends Annotation>
-
getComposingConstraints
- Specified by:
getComposingConstraints
in interfaceConstraintDescriptor<T extends Annotation>
-
getComposingConstraintImpls
-
isReportAsSingleViolation
public boolean isReportAsSingleViolation()- Specified by:
isReportAsSingleViolation
in interfaceConstraintDescriptor<T extends Annotation>
-
getConstraintLocationKind
-
getDefinedOn
-
getConstraintType
-
unwrap
- Specified by:
unwrap
in interfaceConstraintDescriptor<T extends Annotation>
-
equals
-
hashCode
public int hashCode() -
toString
-
getCompositionType
- Returns:
- the compositionType
-