private static <T extends Annotation> boolean findMetaAnnotations(
            ImmutableList.Builder<T> builder, Annotation annotation,
            Class<T> annotationType, @Nullable Class<? extends Annotation> containerType,
            Set<Class<? extends Annotation>> visitedAnnotationTypes) {

        final Class<? extends Annotation> actualAnnotationType = annotation.annotationType();
        if (knownCyclicAnnotationTypes.contains(actualAnnotationType)) {
            return false;
        }
        if (!visitedAnnotationTypes.add(actualAnnotationType)) {
            disallowedListAnnotation(actualAnnotationType);
            return false;
        }

        final Annotation[] metaAnnotations = annotation.annotationType().getDeclaredAnnotations();
        for (final Annotation metaAnnotation : metaAnnotations) {
            if (findMetaAnnotations(builder, metaAnnotation, annotationType, containerType,
                                    visitedAnnotationTypes)) {
                collectAnnotations(builder, metaAnnotation, annotationType, containerType);
            }
        }

        visitedAnnotationTypes.remove(actualAnnotationType);
        return true;
    }
Returns all annotations of the {@code annotationType} searching from the specified {@code element}.
The search range depends on the specified {@link FindOption}s.

@param element the {@link AnnotatedElement} to find annotations
@param annotationType the type of the annotation to find
@param findOptions the options to be applied when finding annotations
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotationUtil.java