Class ExplicitCanonicalModelCompiler<T extends PackageSources>

  • Type Parameters:
    T - a subclass of PackageSources to retrieve the generated results

    public class ExplicitCanonicalModelCompiler<T extends PackageSources>
    extends Object
    An alternative compilation flow that generates code starting from a collection of CompositePackageDescrs, skipping the KnowledgeBuilder entirely. It explicitly invokes the necessary CompilationPhases one after the other and collects the error.
    • Constructor Detail

      • ExplicitCanonicalModelCompiler

        public ExplicitCanonicalModelCompiler​(Collection<org.drools.compiler.lang.descr.CompositePackageDescr> packages,
                                              org.drools.compiler.builder.PackageRegistryManager pkgRegistryManager,
                                              PackageModelManager packageModelManager,
                                              CanonicalModelBuildContext buildContext,
                                              org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl configuration,
                                              org.drools.compiler.builder.impl.BuildResultCollector results,
                                              org.drools.compiler.builder.impl.TypeDeclarationContext typeDeclarationContext,
                                              org.drools.compiler.builder.impl.GlobalVariableContext globalVariableContext,
                                              PackageSourceManager<T> packageSourceManager,
                                              Function<PackageModel,​T> sourceDumpFunction)
    • Method Detail

      • process

        public void process()
      • getBuildResults

        public org.drools.compiler.builder.impl.BuildResultCollector getBuildResults()
      • getPackageSources

        public Collection<T> getPackageSources()