Interface TypeElementConstraintDescriptor<T extends AnnotationMirror>
- All Known Implementing Classes:
TypeElementConstraintDescriptorImpl
public interface TypeElementConstraintDescriptor<T extends AnnotationMirror>
-
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation describing the constraint declaration.Map<String,Map.Entry<? extends ExecutableElement, ? extends AnnotationValue>> Returns a map containing the annotation attribute names as keys and the annotation attribute values as value.Return a set of composingConstraintDescriptors where each descriptor describes a composing constraint.org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKindget constraint location kind.List of the constraint validation implementation classes.org.hibernate.validator.internal.metadata.core.ConstraintOriginget defined on.The set of groups the constraint is applied on.The set of payload the constraint hosts.booleancheck if this is reported as single violation.
-
Method Details
-
getAnnotation
T getAnnotation()Returns the annotation describing the constraint declaration. If a composing constraint, attribute values are reflecting the overridden attributes of the composing constraint- Returns:
- the annotation for this constraint
-
getAttributes
Map<String,Map.Entry<? extends ExecutableElement, getAttributes()? extends AnnotationValue>> Returns a map containing the annotation attribute names as keys and the annotation attribute values as value.If this constraint is used as part of a composed constraint, attribute values are reflecting the overridden attribute of the composing constraint.
- Returns:
- a map containing the annotation attribute names as keys and the annotation attribute values as value
-
getComposingConstraints
List<TypeElementConstraintDescriptor<?>> getComposingConstraints()Return a set of composingConstraintDescriptors where each descriptor describes a composing constraint.ConstraintDescriptorinstances of composing constraints reflect overridden attribute values ingetAttributes()andgetAnnotation().- Returns:
- a set of
TypeElementConstraintDescriptorobjects or an empty set in case there are no composing constraints
-
getConstraintValidatorClasses
List<TypeMirror> getConstraintValidatorClasses()List of the constraint validation implementation classes.- Returns:
- list of the constraint validation implementation classes
-
getGroups
Set<TypeMirror> getGroups()The set of groups the constraint is applied on. If the constraint declares no group, a set with only theDefaultgroup is returned.- Returns:
- the groups the constraint is applied on
-
getPayload
Set<TypeElement> getPayload()The set of payload the constraint hosts.- Returns:
- payload classes hosted on the constraint or an empty set if none
-
isReportAsSingleViolation
boolean isReportAsSingleViolation()check if this is reported as single violation.- Returns:
trueif the constraint is annotated withReportAsSingleViolation
-
getDefinedOn
org.hibernate.validator.internal.metadata.core.ConstraintOrigin getDefinedOn()get defined on.- Returns:
- constraint origin
-
getConstraintLocationKind
org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKind getConstraintLocationKind()get constraint location kind.- Returns:
- constraint location kind
-