Search in sources :

Example 1 with PackageParser

use of org.drools.impact.analysis.parser.impl.PackageParser in project drools by kiegroup.

the class ImpactModelBuilderImpl method buildRules.

protected void buildRules(Collection<CompositePackageDescr> packages) {
    if (hasErrors()) {
        // if Error while generating pojo do not try compile rule as they very likely depends hence fail too.
        return;
    }
    for (CompositePackageDescr packageDescr : packages) {
        setAssetFilter(packageDescr.getFilter());
        PackageRegistry pkgRegistry = getPackageRegistry(packageDescr.getNamespace());
        PackageModel packageModel = getPackageModel(packageDescr, pkgRegistry, packageDescr.getName());
        PackageModel.initPackageModel(this, pkgRegistry.getPackage(), pkgRegistry.getTypeResolver(), packageDescr, packageModel);
        analysisModel.addPackage(new PackageParser(this, packageModel, packageDescr, pkgRegistry).parse());
    }
}
Also used : PackageRegistry(org.drools.compiler.compiler.PackageRegistry) PackageParser(org.drools.impact.analysis.parser.impl.PackageParser) CompositePackageDescr(org.drools.compiler.lang.descr.CompositePackageDescr) PackageModel(org.drools.modelcompiler.builder.PackageModel)

Aggregations

PackageRegistry (org.drools.compiler.compiler.PackageRegistry)1 CompositePackageDescr (org.drools.compiler.lang.descr.CompositePackageDescr)1 PackageParser (org.drools.impact.analysis.parser.impl.PackageParser)1 PackageModel (org.drools.modelcompiler.builder.PackageModel)1