code: private static List<TableFactory> discoverFactories(Optional<ClassLoader> classLoader) {
  		try {
  			List<TableFactory> result = new LinkedList<>();
  			if (classLoader.isPresent()) {
  				ServiceLoader
  					.load(TableFactory.class, classLoader.get())
  					.iterator()
  					.forEachRemaining(result::add);
  			} else {
  				defaultLoader.iterator().forEachRemaining(result::add);
  			}
  			return result;
  		} catch (ServiceConfigurationError e) {
  			LOG.error("Could not load service provider for table factories.", e);
  			throw new TableException("Could not load service provider for table factories.", e);
  		}
  
  	}
docs: Searches for factories using Java service providers.
  
  @return all factories in the classpath