public <A extends Annotation> A getContainerItemAnnotationConsideringFieldAndGetterIfSupported(Class<A> annotationClass,
            Predicate<Annotation> considerOtherAnnotation) {
        if (this.isFakeContainerItemScope()) {
            return this.getContainerItemAnnotationConsideringFieldAndGetter(annotationClass, considerOtherAnnotation);
        }
        // in addition to an explicitly marked "faked container item scope", also support a type wrapped in an Optional
        if (this.getOverriddenType() == null || this.getDeclaredType().getErasedType() != Optional.class) {
            return null;
        }
        if (this.getOverriddenType().getErasedType() == this.getDeclaredType().getTypeParameters().get(0).getErasedType()) {
            return this.getContainerItemAnnotationConsideringFieldAndGetter(annotationClass, considerOtherAnnotation);
        }
        return null;
    }
Return the annotation of the given type on the member's container item (i.e. single type parameter if there is one), if such an annotation is
present on either the field or its getter and this particular member is either a collection or special generic type (e.g. {@link Optional}).
<br>
Additionally, also consider annotations on annotations, if the given predicate indicates another annotation as eligible for holding the target.

@param <A> type of annotation
@param annotationClass type of annotation
@param considerOtherAnnotation check whether some other annotation should also be checked for holding an instance of the target annotation
@return annotation instance (or {@code null} if no annotation of the given type is present or this look-up is not supported by default)

@since 4.30.0
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/MemberScope.java