class KiePMMLPredicateFactory {

    static Map<String, String> getKiePMMLSimplePredicateSourcesMap(final KiePMMLSimplePredicate kiePMMLSimplePredicate, final String packageName) {
        String className = getSanitizedClassName(kiePMMLSimplePredicate.getId());
        CompilationUnit cloneCU = JavaParserUtils.getKiePMMLModelCompilationUnit(className, packageName,
                                                                                 KIE_PMML_SIMPLE_PREDICATE_TEMPLATE_JAVA, KIE_PMML_SIMPLE_PREDICATE_TEMPLATE);
        ClassOrInterfaceDeclaration predicateTemplate = cloneCU.getClassByName(className)
                .orElseThrow(() -> new KiePMMLException(MAIN_CLASS_NOT_FOUND + ": " + className));
        final ConstructorDeclaration constructorDeclaration = predicateTemplate.getDefaultConstructor()
                .orElseThrow(() -> new KiePMMLInternalException(String.format(MISSING_DEFAULT_CONSTRUCTOR,
                                                                              predicateTemplate.getName())));
        setSimplePredicateConstructor(className,
                                      kiePMMLSimplePredicate.getName(),
                                      constructorDeclaration,
                                      kiePMMLSimplePredicate.getOperator(),
                                      kiePMMLSimplePredicate.getValue());
        return Collections.singletonMap(getFullClassName(cloneCU), cloneCU.toString());
    }

    private  KiePMMLPredicateFactory();

}