Interface TypeElementConstraintDescriptor<T extends AnnotationMirror>
-
- All Known Implementing Classes:
TypeElementConstraintDescriptorImpl
public interface TypeElementConstraintDescriptor<T extends AnnotationMirror>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetAnnotation()Returns the annotation describing the constraint declaration.Map<String,Map.Entry<? extends ExecutableElement,? extends AnnotationValue>>getAttributes()Returns a map containing the annotation attribute names as keys and the annotation attribute values as value.List<TypeElementConstraintDescriptor<?>>getComposingConstraints()Return a set of composingConstraintDescriptors where each descriptor describes a composing constraint.org.hibernate.validator.internal.metadata.location.ConstraintLocation.ConstraintLocationKindgetConstraintLocationKind()get constraint location kind.List<TypeMirror>getConstraintValidatorClasses()List of the constraint validation implementation classes.org.hibernate.validator.internal.metadata.core.ConstraintOrigingetDefinedOn()get defined on.Set<TypeMirror>getGroups()The set of groups the constraint is applied on.Set<TypeElement>getPayload()The set of payload the constraint hosts.booleanisReportAsSingleViolation()check if this is reported as single violation.
-
-
-
Method Detail
-
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,? extends AnnotationValue>> getAttributes()
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
-
-