private static Iterable<Class<?>> getAllSortedSuperTypes(final Class<?> type,
                                                             Predicate<? super Class<?>>... predicates) {
        final List<Class<?>> result = new ArrayList<>();
        if (includeObject || !type.equals(Object.class)) {
            result.add(type);
            for (Class<?> supertype : getSuperTypes(type)) {
                getAllSortedSuperTypes(supertype).forEach(result::add);
            }
        }
        return filter(result, predicates);
    }
get all methods of given type which are sorted from bottom class, up the super class hierarchy,
optionally filtered by predicates.
grpc/src/main/java/com/linecorp/armeria/server/grpc/InternalReflectionUtils.java