Class ConstraintDescriptorImpl<T extends Annotation>

java.lang.Object
de.knightsoftnet.validators.client.impl.ConstraintDescriptorImpl<T>
Type Parameters:
T - the constraint annotation to describe.
All Implemented Interfaces:
javax.validation.metadata.ConstraintDescriptor<T>

public class ConstraintDescriptorImpl<T extends Annotation> extends Object implements javax.validation.metadata.ConstraintDescriptor<T>
A immutable GWT implementation of ConstraintDescriptor.
  • Field Details

  • Constructor Details

    • ConstraintDescriptorImpl

      protected ConstraintDescriptorImpl(T annotation, Set<Class<?>> groups, Set<Class<? extends javax.validation.Payload>> payload, List<Class<? extends javax.validation.ConstraintValidator<T,?>>> constraintValidatorClasses, Map<String,Object> attributes, Set<javax.validation.metadata.ConstraintDescriptor<?>> composingConstraints, boolean reportAsSingleViolation, ElementType elementType, org.hibernate.validator.internal.metadata.core.ConstraintOrigin definedOn)
  • Method Details

    • builder

      public static <T extends Annotation> ConstraintDescriptorImpl.Builder<T> builder()
    • getAnnotation

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

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

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

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

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

      public org.hibernate.validator.internal.metadata.core.ConstraintOrigin getDefinedOn()
    • getElementType

      public ElementType getElementType()
    • getGroups

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

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

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

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

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

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

      public String toString()
      For debugging only. Do not rely on the format. It can change at any time.
      Overrides:
      toString in class Object