class KiePMMLRegressionTableClassificationFactory {

    static void populateOutputFieldsMap(final ClassOrInterfaceDeclaration tableTemplate,
                                                final List<KiePMMLOutputField> outputFields) {
        MethodDeclaration methodDeclaration = tableTemplate.getMethodsByName("populateOutputFieldsMapWithResult").get(0);
        BlockStmt body =
                methodDeclaration.getBody().orElseThrow(() -> new KiePMMLInternalException(String.format(MISSING_BODY_TEMPLATE, "populateOutputFieldsMapWithResult")));
        populateOutputFieldsMapWithResult(body, outputFields);
        methodDeclaration = tableTemplate.getMethodsByName("populateOutputFieldsMapWithProbability").get(0);
        body =
                methodDeclaration.getBody().orElseThrow(() -> new KiePMMLInternalException(String.format(MISSING_BODY_TEMPLATE, "populateOutputFieldsMapWithProbability")));
        populateOutputFieldsMapWithProbability(body, outputFields);
    }

    private  KiePMMLRegressionTableClassificationFactory();

}