class KiePMMLTreeModelFactory {

    static void setConstructor(final TreeModel treeModel, final ConstructorDeclaration constructorDeclaration, final SimpleName modelName) {
        setConstructorSuperNameInvocation(modelName.asString(), constructorDeclaration, treeModel.getModelName());
        final BlockStmt body = constructorDeclaration.getBody();
        final ExplicitConstructorInvocationStmt superStatement = CommonCodegenUtils.getExplicitConstructorInvocationStmt(body)
                .orElseThrow(() -> new KiePMMLException(String.format(MISSING_CONSTRUCTOR_IN_BODY, body)));
        CommonCodegenUtils.setExplicitConstructorInvocationArgument(superStatement, "algorithmName", String.format("\"%s\"", treeModel.getAlgorithmName()));
    }

    private  KiePMMLTreeModelFactory();

}