class SecurityAnalysisPreprocessors {

    public static SecurityAnalysisPreprocessorFactory factoryForName(String name) {
        requireNonNull(name);
        List<SecurityAnalysisPreprocessorFactory> factories = new ServiceLoaderCache<>(SecurityAnalysisPreprocessorFactory.class).getServices();
        return factories.stream()
                .filter(f -> f.getName().equals(name))
                .findFirst()
                .orElseThrow(() -> new PowsyblException("Could not find any security analysis preprocessor for name " + name));
    }

    private  SecurityAnalysisPreprocessors();

}