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
ConstraintDescriptor s 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() |
public 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()
ConstraintDescriptor
getAnnotation
in interface ConstraintDescriptor<T extends Annotation>
public String getMessageTemplate()
ConstraintDescriptor
getMessageTemplate
in interface ConstraintDescriptor<T extends Annotation>
public Set<Class<?>> getGroups()
ConstraintDescriptor
Default
group is returned.getGroups
in interface ConstraintDescriptor<T extends Annotation>
public Set<Class<? extends Payload>> getPayload()
ConstraintDescriptor
getPayload
in interface ConstraintDescriptor<T extends Annotation>
public ConstraintTarget getValidationAppliesTo()
ConstraintDescriptor
getValidationAppliesTo
in interface ConstraintDescriptor<T extends Annotation>
ConstraintTarget
value or null
public List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
ConstraintDescriptor
getConstraintValidatorClasses
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()
ConstraintDescriptor
getAttributes
in interface ConstraintDescriptor<T extends Annotation>
public Set<ConstraintDescriptor<?>> getComposingConstraints()
ConstraintDescriptor
ConstraintDescriptor
s 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 ReportAsSingleViolation
public ElementType getElementType()
public ConstraintOrigin getDefinedOn()
public ConstraintDescriptorImpl.ConstraintType getConstraintType()
public CompositionType getCompositionType()
Copyright © 2016 JBoss by Red Hat. All rights reserved.