}
// validation processing for annotations with annotation constraint
for (AnnotationMirror annotationMirror : annotationType
.getAnnotationMirrors()) {
TypeElement memberAnnotationTypeElement = (TypeElement) annotationMirror
.getAnnotationType().asElement();
Class<? extends ConstraintValidator> constraintValidatorClass = null;
if (shouldSkip(memberAnnotationTypeElement)) {
continue;
}
constraintValidatorClass = (Class<? extends ConstraintValidator>) getConstraintValidatorClass(
memberAnnotationTypeElement, Constraint.class);
ConstraintValidator validator = getConstraintValidator(
constraintValidatorClass, constraintValidatorMap);
if (validator != null) {
for (Element e : roundEnv
.getElementsAnnotatedWith(annotationType)) {
validator.validate(processingEnv, roundEnv,
annotationType, annotationMirror, e);
}
}
}
// validation processing for annotation member values
for (ExecutableElement annotationMember : ElementFilter
.methodsIn(annotationType.getEnclosedElements())) {
// annotationMember is a method of an annotation
for (AnnotationMirror annotationMirror : annotationMember
.getAnnotationMirrors()) {
// annotationMirror is an annotation on a method of an
// annotation
TypeElement memberAnnotationTypeElement = (TypeElement) annotationMirror
.getAnnotationType().asElement();
Class<? extends ValueConstraintValidator> constraintValidatorClass = null;
if (shouldSkip(memberAnnotationTypeElement)) {
continue;