code: @SuppressWarnings("unchecked")
     private <T> T loadService(Class<T> spiType, Class<?> defaultImpl, ClassLoader loader)
     {
        final String defaultImplName = defaultImpl != null ? defaultImpl.getName() : null;
        return (T)ServiceLoader.loadService(spiType.getName(), defaultImplName, loader);
     }
docs: Load SPI implementation through ServiceLoader