public class ConstraintDescriptorImpl<T extends Annotation> extends Object implements ConstraintDescriptor<T>, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstraintDescriptorImpl.ConstraintType
The type of a constraint.
|
| Constructor and Description |
|---|
ConstraintDescriptorImpl(ConstraintHelper constraintHelper,
Member member,
T annotation,
ElementType type) |
ConstraintDescriptorImpl(ConstraintHelper constraintHelper,
Member member,
T annotation,
ElementType type,
Class<?> implicitGroup,
ConstraintOrigin definedOn,
ConstraintDescriptorImpl.ConstraintType externalConstraintType) |
ConstraintDescriptorImpl(ConstraintHelper constraintHelper,
Member member,
T annotation,
ElementType type,
ConstraintDescriptorImpl.ConstraintType constraintType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
T |
getAnnotation()
Returns the annotation describing the constraint declaration.
|
Class<T> |
getAnnotationType() |
Map<String,Object> |
getAttributes()
Returns a map containing the annotation attribute names as keys and the
annotation attribute values as value.
|
Map<Type,Class<? extends ConstraintValidator<T,?>>> |
getAvailableValidatorTypes() |
Set<ConstraintDescriptorImpl<?>> |
getComposingConstraintImpls() |
Set<ConstraintDescriptor<?>> |
getComposingConstraints()
Return a set of composing
ConstraintDescriptors where each
descriptor describes a composing constraint. |
CompositionType |
getCompositionType() |
ConstraintDescriptorImpl.ConstraintType |
getConstraintType() |
List<Class<? extends ConstraintValidator<T,?>>> |
getConstraintValidatorClasses()
List of the constraint validation implementation classes.
|
ConstraintOrigin |
getDefinedOn() |
ElementType |
getElementType() |
Set<Class<?>> |
getGroups()
The set of groups the constraint is applied on.
|
List<Class<? extends ConstraintValidator<T,?>>> |
getMatchingConstraintValidatorClasses()
Return all constraint validators classes (either generic or cross-parameter) which are registered for the
constraint of this despriptor.
|
String |
getMessageTemplate()
The non-interpolated error message
|
Set<Class<? extends Payload>> |
getPayload()
The set of payload the constraint hosts.
|
ConstraintTarget |
getValidationAppliesTo()
|
int |
hashCode() |
boolean |
isReportAsSingleViolation() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValueUnwrapping, unwrappublic ConstraintDescriptorImpl(ConstraintHelper constraintHelper, Member member, T annotation, ElementType type, Class<?> implicitGroup, ConstraintOrigin definedOn, ConstraintDescriptorImpl.ConstraintType externalConstraintType)
public ConstraintDescriptorImpl(ConstraintHelper constraintHelper, Member member, T annotation, ElementType type)
public ConstraintDescriptorImpl(ConstraintHelper constraintHelper, Member member, T annotation, ElementType type, ConstraintDescriptorImpl.ConstraintType constraintType)
public T getAnnotation()
ConstraintDescriptorgetAnnotation in interface ConstraintDescriptor<T extends Annotation>public String getMessageTemplate()
ConstraintDescriptorgetMessageTemplate in interface ConstraintDescriptor<T extends Annotation>public Set<Class<?>> getGroups()
ConstraintDescriptorDefault
group is returned.getGroups in interface ConstraintDescriptor<T extends Annotation>public Set<Class<? extends Payload>> getPayload()
ConstraintDescriptorgetPayload in interface ConstraintDescriptor<T extends Annotation>public ConstraintTarget getValidationAppliesTo()
ConstraintDescriptorgetValidationAppliesTo in interface ConstraintDescriptor<T extends Annotation>ConstraintTarget value or nullpublic List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
ConstraintDescriptorgetConstraintValidatorClasses in interface ConstraintDescriptor<T extends Annotation>public List<Class<? extends ConstraintValidator<T,?>>> getMatchingConstraintValidatorClasses()
public Map<Type,Class<? extends ConstraintValidator<T,?>>> getAvailableValidatorTypes()
public Map<String,Object> getAttributes()
ConstraintDescriptorIf this constraint is used as part of a composed constraint, attribute values are reflecting the overridden attribute of the composing constraint.
getAttributes in interface ConstraintDescriptor<T extends Annotation>public Set<ConstraintDescriptor<?>> getComposingConstraints()
ConstraintDescriptorConstraintDescriptors where each
descriptor describes a composing constraint. ConstraintDescriptor
instances of composing constraints reflect overridden attribute values in
ConstraintDescriptor.getAttributes() and ConstraintDescriptor.getAnnotation().getComposingConstraints in interface ConstraintDescriptor<T extends Annotation>ConstraintDescriptor objects or an empty set
in case there are no composing constraintspublic Set<ConstraintDescriptorImpl<?>> getComposingConstraintImpls()
public boolean isReportAsSingleViolation()
isReportAsSingleViolation in interface ConstraintDescriptor<T extends Annotation>true if the constraint is annotated with ReportAsSingleViolationpublic ElementType getElementType()
public ConstraintOrigin getDefinedOn()
public ConstraintDescriptorImpl.ConstraintType getConstraintType()
public CompositionType getCompositionType()
Copyright © 2018 JBoss by Red Hat. All rights reserved.