private boolean hasValidation()

in bval-jsr/src/main/java/org/apache/bval/cdi/BValExtension.java [245:270]


    private boolean hasValidation(final AnnotatedElement element) {
        for (Annotation annotation : element.getAnnotations()) {
            final Class<? extends Annotation> type = annotation.annotationType();
            if (type == ValidateOnExecution.class || type == Valid.class) {
                return true;
            }
            if (isSkippedAnnotation(type)) {
                continue;
            }
            if (type.getName().startsWith("jakarta.validation.constraints")) {
                return true;
            }
            if (notBValAnnotation.contains(type)) { // more likely so faster first
                continue;
            }
            if (potentiallyBValAnnotation.contains(type)) {
                return true;
            }
            cacheIsBvalAnnotation(type);
            if (potentiallyBValAnnotation.contains(type)) {
                return true;
            }
        }

        return false;
    }