use of org.drools.modelcompiler.builder.generator.FunctionGenerator in project drools by kiegroup.
the class PackageModel method initPackageModel.
public static void initPackageModel(KnowledgeBuilderImpl kbuilder, InternalKnowledgePackage pkg, TypeResolver typeResolver, PackageDescr packageDescr, PackageModel packageModel) {
packageModel.addImports(pkg.getImports().keySet());
packageModel.addStaticImports(pkg.getStaticImports());
packageModel.addEntryPoints(packageDescr.getEntryPointDeclarations());
packageModel.addGlobals(pkg);
packageModel.setAccumulateFunctions(pkg.getAccumulateFunctions());
packageModel.setInternalKnowledgePackage(pkg);
new WindowReferenceGenerator(packageModel, typeResolver).addWindowReferences(kbuilder, packageDescr.getWindowDeclarations());
packageModel.addAllFunctions(packageDescr.getFunctions().stream().map(FunctionGenerator::toFunction).collect(toList()));
}
Aggregations