class SecurityAnalysisExecutionBuilder {

    public SecurityAnalysisExecution build() {
        if (forward) {
            return new ForwardedSecurityAnalysisExecution(externalConfig.get(), taskCount);
        } else if (taskCount != null) {
            return new DistributedSecurityAnalysisExecution(externalConfig.get(), taskCount);
        } else {
            return new SecurityAnalysisExecutionImpl(factory.get(), inputBuildStrategy());
        }
    }

    public  SecurityAnalysisExecutionBuilder(Supplier<ExternalSecurityAnalysisConfig> externalConfig,
                                            Supplier<SecurityAnalysisFactory> factory,
                                            SecurityAnalysisInputBuildStrategy inputBuildStrategy);

}