class JDBCDriverURLRecognizerEngine {

    public static JDBCDriverURLRecognizer getJDBCDriverURLRecognizer(final String url) {
        JDBCDriverURLRecognizer result = JDBC_DRIVER_URL_RECOGNIZERS.stream().filter(each -> isMatchURL(url, each)).findAny()
                .orElseThrow(() -> new ShardingSphereException("Cannot resolve JDBC url `%s`. Please implements `%s` and add to SPI.", url, JDBCDriverURLRecognizer.class.getName()));
        if (result instanceof JDBCDriverComposeURLRecognizer) {
            return ((JDBCDriverComposeURLRecognizer) result).getDriverURLRecognizer(url);
        }
        return result;
    }

}