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:
  • Constructor Details

  • Method Details

    • getAnnotationDescriptor

      public ConstraintAnnotationDescriptor<T> getAnnotationDescriptor()
    • getAnnotation

      public T getAnnotation()
      Specified by:
      getAnnotation in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getAnnotationType

      public Class<T> getAnnotationType()
    • getMessageTemplate

      public String getMessageTemplate()
      Specified by:
      getMessageTemplate in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getGroups

      public Set<Class<?>> getGroups()
      Specified by:
      getGroups in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getPayload

      public Set<Class<? extends jakarta.validation.Payload>> getPayload()
      Specified by:
      getPayload in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getValidationAppliesTo

      public jakarta.validation.ConstraintTarget getValidationAppliesTo()
      Specified by:
      getValidationAppliesTo in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getValueUnwrapping

      public jakarta.validation.metadata.ValidateUnwrappedValue getValueUnwrapping()
      Specified by:
      getValueUnwrapping in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getConstraintValidatorClasses

      public List<Class<? extends jakarta.validation.ConstraintValidator<T,?>>> getConstraintValidatorClasses()
      Specified by:
      getConstraintValidatorClasses in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getMatchingConstraintValidatorDescriptors

      public List<ConstraintValidatorDescriptor<T>> 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

      public Map<String,Object> getAttributes()
      Specified by:
      getAttributes in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getComposingConstraints

      public Set<jakarta.validation.metadata.ConstraintDescriptor<?>> getComposingConstraints()
      Specified by:
      getComposingConstraints in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getComposingConstraintImpls

      public Set<ConstraintDescriptorImpl<?>> getComposingConstraintImpls()
    • isReportAsSingleViolation

      public boolean isReportAsSingleViolation()
      Specified by:
      isReportAsSingleViolation in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • getConstraintLocationKind

      public ConstraintLocation.ConstraintLocationKind getConstraintLocationKind()
    • getDefinedOn

      public ConstraintOrigin getDefinedOn()
    • getConstraintType

      public ConstraintDescriptorImpl.ConstraintType getConstraintType()
    • unwrap

      public <U> U unwrap(Class<U> type)
      Specified by:
      unwrap in interface jakarta.validation.metadata.ConstraintDescriptor<T extends Annotation>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getCompositionType

      public CompositionType getCompositionType()
      Returns:
      the compositionType