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;
}
constraintValidatorClass = (Class<? extends ValueConstraintValidator>) getConstraintValidatorClass(
memberAnnotationTypeElement, ValueConstraint.class);
ValueConstraintValidator validator = getConstraintValidator(
constraintValidatorClass,
valueConstraintValidatorMap);
if (validator != null) {
for (Element e : roundEnv
.getElementsAnnotatedWith(annotationType)) {
AnnotationMirror elementAnnotationMirror = AnnotationProcessingUtil
.findAnnotationMirror(processingEnv, e,
annotationType);
Object actualValue = AnnotationProcessingUtil
.getAnnotationElementValue(
processingEnv,
elementAnnotationMirror,
annotationMember.getSimpleName()
.toString()).getValue();
validator.validate(processingEnv, roundEnv,
annotationType, annotationMirror,
annotationMember, e, actualValue);
}
}
}