protected <A extends Annotation> A getAnnotationFromFieldOrGetter(MemberScope<?, ?> member, Class<A> annotationClass,
            Function<A, Class<?>[]> validationGroupsLookup) {
        Predicate<Annotation> isConstraintAnnotation = this::isConstraintAnnotation;
        A containerItemAnnotation = member.getContainerItemAnnotationConsideringFieldAndGetterIfSupported(annotationClass, isConstraintAnnotation);
        if (this.shouldConsiderAnnotation(containerItemAnnotation, validationGroupsLookup)) {
            return containerItemAnnotation;
        }
        A annotation = member.getAnnotationConsideringFieldAndGetterIfSupported(annotationClass, isConstraintAnnotation);
        if (this.shouldConsiderAnnotation(annotation, validationGroupsLookup)) {
            return annotation;
        }
        return null;
    }
Retrieves the annotation instance of the given type, either from the field itself or (if not present) from its getter.
<br>
If the given field/method represents only a container item of the actual declared type, that container item's annotations are being checked.

@param <A> type of annotation
@param member field or method to retrieve annotation instance from (or from a field's getter or getter method's field)
@param annotationClass type of annotation
@param validationGroupsLookup how to look-up the associated validation groups of an annotation instance
@return annotation instance (or {@code null})
@see MemberScope#getAnnotationConsideringFieldAndGetterIfSupported(Class)
@see MemberScope#getContainerItemAnnotationConsideringFieldAndGetterIfSupported(Class)
jsonschema-module-javax-validation/src/main/java/com/github/victools/jsonschema/module/javax/validation/JavaxValidationModule.java