private static List<Parser> getDefaultParsers(ServiceLoader loader,
                                                  EncodingDetector encodingDetector,
                                                  Renderer renderer,
                                                  Collection<Class<? extends Parser>>
                                                          excludeParsers) {
        List<Parser> parsers =
                loader.loadStaticServiceProviders(Parser.class, excludeParsers);

        if (encodingDetector != null) {
            for (Parser p : parsers) {
                setEncodingDetector(p, encodingDetector);
            }
        }
        if (renderer != null) {
            for (Parser p : parsers) {
                setRenderer(p, renderer);
            }
        }
        ServiceLoaderUtils.sortLoadedClasses(parsers);
        //reverse the order of parsers so that custom ones come last
        //this will prevent them from being overwritten in getParsers(ParseContext ..)
        Collections.reverse(parsers);
        return parsers;
    }
Finds all statically loadable parsers and sort the list by name,
rather than discovery order. CompositeParser takes the last
parser for any given media type, so put the Tika parsers first
so that non-Tika (user supplied) parsers can take precedence.

@param loader service loader
@return ordered list of statically loadable parsers
tika-core/src/main/java/org/apache/tika/parser/DefaultParser.java