private static List<Class<?>> collectClasses(Class<?> clazz, boolean collectSuperClassesFirst) {
        final ImmutableList.Builder<Class<?>> classCollector = ImmutableList.builder();
        collectClasses(clazz, classCollector, collectSuperClassesFirst);
        return classCollector.build();
    }
Collects the list of {@link AnnotatedElement}s which are to be used to find annotations.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotationUtil.java