public class ConstraintHelper extends Object
| Constructor and Description |
|---|
ConstraintHelper() |
| Modifier and Type | Method and Description |
|---|---|
<A extends Annotation> |
addConstraintValidatorDefinition(Class<A> annotationClass,
List<Class<? extends ConstraintValidator<? extends Annotation,?>>> definitionClasses) |
boolean |
containsConstraintValidatorDefinition(Class<? extends Annotation> annotationClass) |
List<Class<? extends ConstraintValidator<? extends Annotation,?>>> |
getBuiltInConstraints(Class<? extends Annotation> annotationClass) |
<T extends Annotation> |
getConstraintValidatorDefinition(Class<T> annotationClass) |
<A extends Annotation> |
getMultiValueConstraints(A annotation)
Checks whether a given annotation is a multi value constraint and returns the contained constraints if so.
|
boolean |
isBuiltinConstraint(Class<? extends Annotation> annotationType) |
boolean |
isConstraintAnnotation(Class<? extends Annotation> annotationType)
Checks whether the specified annotation is a valid constraint annotation.
|
boolean |
isConstraintComposition(Class<? extends Annotation> annotationType) |
boolean |
isMultiValueConstraint(Class<? extends Annotation> annotationType)
Checks whether a given annotation is a multi value constraint or not.
|
public List<Class<? extends ConstraintValidator<? extends Annotation,?>>> getBuiltInConstraints(Class<? extends Annotation> annotationClass)
public boolean isBuiltinConstraint(Class<? extends Annotation> annotationType)
public boolean isMultiValueConstraint(Class<? extends Annotation> annotationType)
annotationType - the annotation type to check.true if the specified annotation is a multi value constraints, false
otherwise.public <A extends Annotation> List<Annotation> getMultiValueConstraints(A annotation)
annotation - the annotation to check.annotation is not a multi constraint
annotation.public boolean isConstraintAnnotation(Class<? extends Annotation> annotationType)
ConstraintValidator implementation.annotationType - The annotation type to test.true if the annotation fulfills the above condtions, false otherwise.public <T extends Annotation> List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorDefinition(Class<T> annotationClass)
public <A extends Annotation> void addConstraintValidatorDefinition(Class<A> annotationClass, List<Class<? extends ConstraintValidator<? extends Annotation,?>>> definitionClasses)
public boolean containsConstraintValidatorDefinition(Class<? extends Annotation> annotationClass)
public boolean isConstraintComposition(Class<? extends Annotation> annotationType)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.