class KiePMMLPredicateFactory {

    static Map<String, String> getKiePMMLTruePredicateSourcesMap(final KiePMMLTruePredicate kiePMMLTruePredicate,
                                                                 final String packageName) {
        String className = getSanitizedClassName(kiePMMLTruePredicate.getId());
        CompilationUnit cloneCU = JavaParserUtils.getKiePMMLModelCompilationUnit(className, packageName,
                                                                                 KIE_PMML_TRUE_PREDICATE_TEMPLATE_JAVA, KIE_PMML_TRUE_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())));
        setTrueFalsePredicateConstructor(className,
                                         kiePMMLTruePredicate.getName(),
                                         constructorDeclaration);
        return Collections.singletonMap(getFullClassName(cloneCU), cloneCU.toString());
    }

    private  KiePMMLPredicateFactory();

}