Search in sources :

Example 16 with PackageRegistry

use of org.drools.compiler.compiler.PackageRegistry in project drools by kiegroup.

the class ObjectTypeNodeCompiler method compile.

/**
 * Creates a {@link CompiledNetwork} for the specified {@link ObjectTypeNode}. The {@link PackageBuilder} is used
 * to compile the generated source and load the class.
 *
 * @param kBuilder     builder used to compile and load class
 * @param objectTypeNode OTN we are generating a compiled network for
 * @return CompiledNetwork
 */
public static CompiledNetwork compile(KnowledgeBuilderImpl kBuilder, ObjectTypeNode objectTypeNode) {
    if (objectTypeNode == null) {
        throw new IllegalArgumentException("ObjectTypeNode cannot be null!");
    }
    if (kBuilder == null) {
        throw new IllegalArgumentException("PackageBuilder cannot be null!");
    }
    ObjectTypeNodeCompiler compiler = new ObjectTypeNodeCompiler(objectTypeNode);
    String packageName = compiler.getPackageName();
    PackageRegistry pkgReg = kBuilder.getPackageRegistry(packageName);
    if (pkgReg == null) {
        kBuilder.addPackage(new PackageDescr(packageName));
        pkgReg = kBuilder.getPackageRegistry(packageName);
    }
    String source = compiler.generateSource();
    String generatedSourceName = compiler.getName();
    JavaDialect dialect = (JavaDialect) pkgReg.getDialectCompiletimeRegistry().getDialect("java");
    dialect.addSrc(compiler.getBinaryName(), source.getBytes(IoUtils.UTF8_CHARSET));
    kBuilder.compileAll();
    kBuilder.updateResults();
    CompiledNetwork network;
    try {
        network = (CompiledNetwork) Class.forName(generatedSourceName, true, kBuilder.getRootClassLoader()).newInstance();
    } catch (ClassNotFoundException e) {
        throw new RuntimeException("This is a bug. Please contact the development team", e);
    } catch (IllegalAccessException e) {
        throw new RuntimeException("This is a bug. Please contact the development team", e);
    } catch (InstantiationException e) {
        throw new RuntimeException("This is a bug. Please contact the development team", e);
    }
    return network;
}
Also used : PackageRegistry(org.drools.compiler.compiler.PackageRegistry) PackageDescr(org.drools.compiler.lang.descr.PackageDescr) CompiledNetwork(org.drools.core.reteoo.compiled.CompiledNetwork) JavaDialect(org.drools.compiler.rule.builder.dialect.java.JavaDialect)

Example 17 with PackageRegistry

use of org.drools.compiler.compiler.PackageRegistry in project drools by kiegroup.

the class DMNAssemblerService method compileResourceToModel.

private DMNModel compileResourceToModel(KnowledgeBuilderImpl kbuilderImpl, DMNCompiler dmnCompiler, Resource resource, Collection<DMNModel> dmnModels) {
    DMNModel model = dmnCompiler.compile(resource, dmnModels);
    if (model != null) {
        String namespace = model.getNamespace();
        PackageRegistry pkgReg = kbuilderImpl.getOrCreatePackageRegistry(new PackageDescr(namespace));
        InternalKnowledgePackage kpkgs = pkgReg.getPackage();
        kpkgs.addCloningResource(DMN_COMPILER_CACHE_KEY, dmnCompiler);
        Map<ResourceType, ResourceTypePackage> rpkg = kpkgs.getResourceTypePackages();
        DMNPackageImpl dmnpkg = (DMNPackageImpl) rpkg.get(ResourceType.DMN);
        if (dmnpkg == null) {
            dmnpkg = new DMNPackageImpl(namespace);
            rpkg.put(ResourceType.DMN, dmnpkg);
        } else {
            if (dmnpkg.getModel(model.getName()) != null) {
                kbuilderImpl.addBuilderResult(new DMNKnowledgeBuilderError(ResultSeverity.ERROR, resource, namespace, "Duplicate model name " + model.getName() + " in namespace " + namespace));
                logger.error("Duplicate model name {} in namespace {}", model.getName(), namespace);
            }
        }
        dmnpkg.addModel(model.getName(), model);
        dmnpkg.addProfiles(kbuilderImpl.getCachedOrCreate(DMN_PROFILES_CACHE_KEY, () -> getDMNProfiles(kbuilderImpl)));
    } else {
        kbuilderImpl.addBuilderResult(new DMNKnowledgeBuilderError(ResultSeverity.ERROR, resource, "Unable to compile DMN model for the resource"));
        logger.error("Unable to compile DMN model for resource {}", resource.getSourcePath());
    }
    return model;
}
Also used : PackageRegistry(org.drools.compiler.compiler.PackageRegistry) DMNPackageImpl(org.kie.dmn.core.impl.DMNPackageImpl) ResourceType(org.kie.api.io.ResourceType) DMNKnowledgeBuilderError(org.kie.dmn.core.impl.DMNKnowledgeBuilderError) PackageDescr(org.drools.compiler.lang.descr.PackageDescr) ResourceTypePackage(org.kie.api.internal.io.ResourceTypePackage) DMNModel(org.kie.dmn.api.core.DMNModel) InternalKnowledgePackage(org.drools.core.definitions.InternalKnowledgePackage)

Example 18 with PackageRegistry

use of org.drools.compiler.compiler.PackageRegistry in project drools by kiegroup.

the class ClassHierarchyManager method mergeFields.

protected void mergeFields(String simpleSuperTypeName, String superTypePackageName, String fullSuper, TypeDeclarationDescr typeDescr, List<TypeDefinition> unresolvedTypes, Map<String, AbstractClassTypeDeclarationDescr> unprocessableDescrs, TypeResolver resolver) {
    Map<String, TypeFieldDescr> fieldMap = new LinkedHashMap<String, TypeFieldDescr>();
    boolean isNovel = TypeDeclarationUtils.isNovelClass(typeDescr, kbuilder.getPackageRegistry(typeDescr.getNamespace()));
    PackageRegistry registry = kbuilder.getPackageRegistry(superTypePackageName);
    InternalKnowledgePackage pack = null;
    if (registry != null) {
        pack = registry.getPackage();
    }
    if (unprocessableDescrs.containsKey(fullSuper)) {
        unprocessableDescrs.put(typeDescr.getType().getFullName(), typeDescr);
        return;
    }
    // if a class is declared in DRL, its package can't be null? The default package is replaced by "defaultpkg"
    boolean isSuperClassTagged = false;
    // in the same package, or in a previous one
    boolean isSuperClassDeclared = true;
    if (pack != null) {
        // look for the supertype declaration in available packages
        TypeDeclaration superTypeDeclaration = pack.getTypeDeclaration(simpleSuperTypeName);
        if (superTypeDeclaration != null && superTypeDeclaration.getTypeClassDef() != null) {
            ClassDefinition classDef = superTypeDeclaration.getTypeClassDef();
            // inherit fields
            for (org.kie.api.definition.type.FactField fld : classDef.getFields()) {
                TypeFieldDescr inheritedFlDescr = buildInheritedFieldDescrFromDefinition(fld, typeDescr);
                fieldMap.put(inheritedFlDescr.getFieldName(), inheritedFlDescr);
            }
            // new classes are already distinguished from tagged external classes
            isSuperClassTagged = !superTypeDeclaration.isNovel();
        }
    } else {
        isSuperClassDeclared = false;
    }
    // look for the class externally
    if (!isSuperClassDeclared || isSuperClassTagged) {
        try {
            Class superKlass;
            if (registry != null) {
                superKlass = registry.getTypeResolver().resolveType(fullSuper);
            } else {
                // if the supertype has not been declared, and we have got so far, it means that this class is not novel
                superKlass = resolver.resolveType(fullSuper);
            }
            buildDescrsFromFields(superKlass, typeDescr, registry, fieldMap);
        } catch (ClassNotFoundException cnfe) {
            unprocessableDescrs.put(typeDescr.getType().getFullName(), typeDescr);
            return;
        }
    }
    // notice that it is not possible to override a field changing its type
    for (String fieldName : typeDescr.getFields().keySet()) {
        if (fieldMap.containsKey(fieldName)) {
            String type1 = fieldMap.get(fieldName).getPattern().getObjectType();
            String type2 = typeDescr.getFields().get(fieldName).getPattern().getObjectType();
            if (type2.lastIndexOf(".") < 0) {
                try {
                    TypeResolver typeResolver = kbuilder.getPackageRegistry(typeDescr.getNamespace()).getTypeResolver();
                    type1 = typeResolver.resolveType(type1).getName();
                    type2 = typeResolver.resolveType(type2).getName();
                    // now that we are at it... this will be needed later anyway
                    fieldMap.get(fieldName).getPattern().setObjectType(type1);
                    typeDescr.getFields().get(fieldName).getPattern().setObjectType(type2);
                } catch (ClassNotFoundException cnfe) {
                // will fail later
                }
            }
            boolean clash = !type1.equals(type2);
            TypeFieldDescr overriding = null;
            if (clash) {
                // this may still be an override using a subclass of the original type
                try {
                    Class<?> sup = resolver.resolveType(type1);
                    Class<?> loc = resolver.resolveType(type2);
                    if (sup.isAssignableFrom(loc)) {
                        clash = false;
                        // mark as non inherited so that a new field is actually built
                        overriding = fieldMap.get(fieldName);
                    }
                } catch (ClassNotFoundException cnfe) {
                // not much to do
                }
            }
            if (clash) {
                kbuilder.addBuilderResult(new TypeDeclarationError(typeDescr, "Cannot redeclare field '" + fieldName + " from " + type1 + " to " + type2));
                typeDescr.setType(null, null);
                return;
            } else {
                String initVal = fieldMap.get(fieldName).getInitExpr();
                TypeFieldDescr fd = typeDescr.getFields().get(fieldName);
                if (fd.getInitExpr() == null) {
                    fd.setInitExpr(initVal);
                }
                fd.setInherited(fieldMap.get(fieldName).isInherited());
                fd.setOverriding(overriding);
                for (String key : fieldMap.get(fieldName).getAnnotationNames()) {
                    if (fd.getAnnotation(key) == null) {
                        fd.addAnnotation(fieldMap.get(fieldName).getAnnotation(key));
                    }
                }
                if (fd.getIndex() < 0) {
                    fd.setIndex(fieldMap.get(fieldName).getIndex());
                }
            }
        }
        fieldMap.put(fieldName, typeDescr.getFields().get(fieldName));
    }
    typeDescr.setFields(fieldMap);
}
Also used : TypeResolver(org.kie.soup.project.datamodel.commons.types.TypeResolver) ClassDefinition(org.drools.core.factmodel.ClassDefinition) LinkedHashMap(java.util.LinkedHashMap) TypeDeclarationError(org.drools.compiler.compiler.TypeDeclarationError) PackageRegistry(org.drools.compiler.compiler.PackageRegistry) TypeFieldDescr(org.drools.compiler.lang.descr.TypeFieldDescr) TypeDeclaration(org.drools.core.rule.TypeDeclaration) InternalKnowledgePackage(org.drools.core.definitions.InternalKnowledgePackage)

Example 19 with PackageRegistry

use of org.drools.compiler.compiler.PackageRegistry in project drools by kiegroup.

the class KnowledgeBuilderImpl method processKieBaseTypes.

protected void processKieBaseTypes() {
    if (!hasErrors() && this.kBase != null) {
        List<InternalKnowledgePackage> pkgs = new ArrayList<>();
        for (PackageRegistry pkgReg : pkgRegistryMap.values()) {
            pkgs.add(pkgReg.getPackage());
        }
        this.kBase.processAllTypesDeclaration(pkgs);
    }
}
Also used : PackageRegistry(org.drools.compiler.compiler.PackageRegistry) ArrayList(java.util.ArrayList) InternalKnowledgePackage(org.drools.core.definitions.InternalKnowledgePackage)

Example 20 with PackageRegistry

use of org.drools.compiler.compiler.PackageRegistry in project drools by kiegroup.

the class KnowledgeBuilderImpl method compileRulesLevel.

private void compileRulesLevel(PackageDescr packageDescr, PackageRegistry pkgRegistry, List<RuleDescr> rules) {
    boolean parallelRulesBuild = this.kBase == null && rules.size() > PARALLEL_RULES_BUILD_THRESHOLD;
    if (parallelRulesBuild) {
        Map<String, RuleBuildContext> ruleCxts = new ConcurrentHashMap<>();
        rules.stream().parallel().filter(ruleDescr -> filterAccepts(ResourceChange.Type.RULE, ruleDescr.getNamespace(), ruleDescr.getName())).forEach(ruleDescr -> {
            initRuleDescr(packageDescr, pkgRegistry, ruleDescr);
            RuleBuildContext context = buildRuleBuilderContext(pkgRegistry, ruleDescr);
            ruleCxts.put(ruleDescr.getName(), context);
            List<? extends KnowledgeBuilderResult> results = addRule(context);
            if (!results.isEmpty()) {
                synchronized (this.results) {
                    this.results.addAll(results);
                }
            }
        });
        for (RuleDescr ruleDescr : rules) {
            RuleBuildContext context = ruleCxts.get(ruleDescr.getName());
            if (context != null) {
                pkgRegistry.getPackage().addRule(context.getRule());
            }
        }
    } else {
        for (RuleDescr ruleDescr : rules) {
            if (filterAccepts(ResourceChange.Type.RULE, ruleDescr.getNamespace(), ruleDescr.getName())) {
                initRuleDescr(packageDescr, pkgRegistry, ruleDescr);
                RuleBuildContext context = buildRuleBuilderContext(pkgRegistry, ruleDescr);
                this.results.addAll(addRule(context));
                pkgRegistry.getPackage().addRule(context.getRule());
            }
        }
    }
}
Also used : WindowDeclarationDescr(org.drools.compiler.lang.descr.WindowDeclarationDescr) Arrays(java.util.Arrays) BaseKnowledgeBuilderResultImpl(org.drools.compiler.compiler.BaseKnowledgeBuilderResultImpl) DescrBuildError(org.drools.compiler.compiler.DescrBuildError) PackageDescr(org.drools.compiler.lang.descr.PackageDescr) DroolsError(org.drools.compiler.compiler.DroolsError) KnowledgeBuilder(org.kie.internal.builder.KnowledgeBuilder) GuidedScoreCardFactory(org.drools.compiler.compiler.GuidedScoreCardFactory) DroolsWarningWrapper(org.drools.compiler.compiler.DroolsWarningWrapper) AccumulateFunction(org.kie.api.runtime.rule.AccumulateFunction) DuplicateRule(org.drools.compiler.compiler.DuplicateRule) Map(java.util.Map) DuplicateFunction(org.drools.compiler.compiler.DuplicateFunction) KnowledgeBaseImpl.registerFunctionClassAndInnerClasses(org.drools.core.impl.KnowledgeBaseImpl.registerFunctionClassAndInnerClasses) ScoreCardFactory(org.drools.compiler.compiler.ScoreCardFactory) XmlPackageReader(org.drools.compiler.compiler.xml.XmlPackageReader) ImportDescr(org.drools.compiler.lang.descr.ImportDescr) Set(java.util.Set) KieAssemblers(org.kie.api.internal.assembler.KieAssemblers) Reader(java.io.Reader) DialectError(org.drools.compiler.rule.builder.dialect.DialectError) FunctionImportDescr(org.drools.compiler.lang.descr.FunctionImportDescr) ResourceConfiguration(org.kie.api.io.ResourceConfiguration) DialectCompiletimeRegistry(org.drools.compiler.compiler.DialectCompiletimeRegistry) DroolsWarning(org.drools.compiler.compiler.DroolsWarning) PMMLCompiler(org.drools.compiler.compiler.PMMLCompiler) RuleImpl(org.drools.core.definitions.rule.impl.RuleImpl) TypeFieldDescr(org.drools.compiler.lang.descr.TypeFieldDescr) PMMLCompilerFactory(org.drools.compiler.compiler.PMMLCompilerFactory) GuidedRuleTemplateFactory(org.drools.compiler.compiler.GuidedRuleTemplateFactory) BaseResource(org.drools.core.io.impl.BaseResource) DescrResource(org.drools.core.io.impl.DescrResource) JaxbConfigurationImpl(org.drools.core.builder.conf.impl.JaxbConfigurationImpl) ChangeSet(org.kie.internal.ChangeSet) ResourceType(org.kie.api.io.ResourceType) Supplier(java.util.function.Supplier) DecisionTableFactory(org.drools.compiler.compiler.DecisionTableFactory) FunctionDescr(org.drools.compiler.lang.descr.FunctionDescr) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) ConfigurableSeverityResult(org.drools.compiler.compiler.ConfigurableSeverityResult) DSLMappingFile(org.drools.compiler.lang.dsl.DSLMappingFile) XmlChangeSetReader(org.drools.core.xml.XmlChangeSetReader) BPMN2ProcessFactory(org.drools.compiler.compiler.BPMN2ProcessFactory) EnumDeclarationDescr(org.drools.compiler.lang.descr.EnumDeclarationDescr) PackageBuilderResults(org.drools.compiler.compiler.PackageBuilderResults) DSLTokenizedMappingFile(org.drools.compiler.lang.dsl.DSLTokenizedMappingFile) ImportDeclaration(org.drools.core.rule.ImportDeclaration) AnnotationDescr(org.drools.compiler.lang.descr.AnnotationDescr) FileOutputStream(java.io.FileOutputStream) AttributeDescr(org.drools.compiler.lang.descr.AttributeDescr) TypeDeclarationDescr(org.drools.compiler.lang.descr.TypeDeclarationDescr) ProjectClassLoader(org.drools.core.common.ProjectClassLoader) IOException(java.io.IOException) BaseDescr(org.drools.compiler.lang.descr.BaseDescr) StringUtils.ucFirst(org.drools.core.util.StringUtils.ucFirst) ParserError(org.drools.compiler.compiler.ParserError) File(java.io.File) WindowDeclaration(org.drools.core.rule.WindowDeclaration) DeprecatedResourceTypeWarning(org.drools.compiler.compiler.DeprecatedResourceTypeWarning) ExecutionException(java.util.concurrent.ExecutionException) PatternDescr(org.drools.compiler.lang.descr.PatternDescr) Dialect(org.drools.compiler.compiler.Dialect) DrlParser(org.drools.compiler.compiler.DrlParser) StringReader(java.io.StringReader) ClassPathResource(org.drools.core.io.impl.ClassPathResource) KnowledgeBuilderErrors(org.kie.internal.builder.KnowledgeBuilderErrors) DroolsErrorWrapper(org.drools.compiler.compiler.DroolsErrorWrapper) DescrBuildWarning(org.drools.compiler.compiler.DescrBuildWarning) Array(java.lang.reflect.Array) RuleDescr(org.drools.compiler.lang.descr.RuleDescr) KieAssemblerService(org.kie.api.internal.assembler.KieAssemblerService) ResourceChange(org.kie.internal.builder.ResourceChange) KnowledgeBuilderError(org.kie.internal.builder.KnowledgeBuilderError) Function(org.drools.core.rule.Function) GuidedRuleTemplateProvider(org.drools.compiler.compiler.GuidedRuleTemplateProvider) TypeDeclaration(org.drools.core.rule.TypeDeclaration) CompositeKnowledgeBuilder(org.kie.internal.builder.CompositeKnowledgeBuilder) ResourceWithConfiguration(org.kie.api.io.ResourceWithConfiguration) LoggerFactory(org.slf4j.LoggerFactory) DecisionTableConfiguration(org.kie.internal.builder.DecisionTableConfiguration) AbstractClassTypeDeclarationDescr(org.drools.compiler.lang.descr.AbstractClassTypeDeclarationDescr) StringUtils.isEmpty(org.drools.core.util.StringUtils.isEmpty) Method(java.lang.reflect.Method) EntryPointDeclarationDescr(org.drools.compiler.lang.descr.EntryPointDeclarationDescr) InternalKnowledgePackage(org.drools.core.definitions.InternalKnowledgePackage) PackageRegistry(org.drools.compiler.compiler.PackageRegistry) GlobalDescr(org.drools.compiler.lang.descr.GlobalDescr) DroolsJaxbHelperProviderImpl(org.drools.compiler.runtime.pipeline.impl.DroolsJaxbHelperProviderImpl) TypeResolver(org.kie.soup.project.datamodel.commons.types.TypeResolver) TypeDeclarationError(org.drools.compiler.compiler.TypeDeclarationError) ScoreCardConfiguration(org.kie.internal.builder.ScoreCardConfiguration) Collection(java.util.Collection) Process(org.kie.api.definition.process.Process) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) KnowledgeBuilderResult(org.kie.internal.builder.KnowledgeBuilderResult) UUID(java.util.UUID) ExpanderException(org.drools.compiler.lang.ExpanderException) DroolsParserException(org.drools.compiler.compiler.DroolsParserException) Resource(org.kie.api.io.Resource) List(java.util.List) KnowledgeBaseFactory(org.drools.core.impl.KnowledgeBaseFactory) DroolsStreamUtils(org.drools.core.util.DroolsStreamUtils) SAXException(org.xml.sax.SAXException) JavaDialectRuntimeData(org.drools.core.rule.JavaDialectRuntimeData) ConditionalElementDescr(org.drools.compiler.lang.descr.ConditionalElementDescr) AccumulateImportDescr(org.drools.compiler.lang.descr.AccumulateImportDescr) ResourceTypeDeclarationWarning(org.drools.compiler.compiler.ResourceTypeDeclarationWarning) ProcessLoadError(org.drools.compiler.compiler.ProcessLoadError) StringUtils(org.drools.core.util.StringUtils) DefaultExpander(org.drools.compiler.lang.dsl.DefaultExpander) KieBaseConfiguration(org.kie.api.KieBaseConfiguration) ReaderResource(org.drools.core.io.impl.ReaderResource) ClassFieldAccessorCache(org.drools.core.base.ClassFieldAccessorCache) Pattern(org.drools.core.rule.Pattern) HashMap(java.util.HashMap) RuleBuilder(org.drools.compiler.rule.builder.RuleBuilder) Stack(java.util.Stack) RuleBuildContext(org.drools.compiler.rule.builder.RuleBuildContext) HashSet(java.util.HashSet) IoUtils(org.drools.core.util.IoUtils) PMMLResource(org.drools.compiler.compiler.PMMLResource) ResultSeverity(org.kie.internal.builder.ResultSeverity) RuleConditionBuilder(org.drools.compiler.rule.builder.RuleConditionBuilder) LinkedList(java.util.LinkedList) KnowledgePackageImpl(org.drools.core.definitions.impl.KnowledgePackageImpl) KieBase(org.kie.api.KieBase) KiePackage(org.kie.api.definition.KiePackage) RuleBuildError(org.drools.compiler.compiler.RuleBuildError) KnowledgeBuilderResults(org.kie.internal.builder.KnowledgeBuilderResults) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) InternalResource(org.drools.core.io.internal.InternalResource) GuidedDecisionTableProvider(org.drools.compiler.compiler.GuidedDecisionTableProvider) PatternDestinationDescr(org.drools.compiler.lang.descr.PatternDestinationDescr) PackageBuilderErrors(org.drools.compiler.compiler.PackageBuilderErrors) GlobalError(org.drools.compiler.compiler.GlobalError) AnnotatedBaseDescr(org.drools.compiler.lang.descr.AnnotatedBaseDescr) AnnotationDeclarationError(org.drools.compiler.compiler.AnnotationDeclarationError) InternalKnowledgeBase(org.drools.core.impl.InternalKnowledgeBase) ServiceRegistry(org.kie.api.internal.utils.ServiceRegistry) GuidedDecisionTableFactory(org.drools.compiler.compiler.GuidedDecisionTableFactory) ProcessBuilderFactory(org.drools.compiler.compiler.ProcessBuilderFactory) CompositePackageDescr(org.drools.compiler.lang.descr.CompositePackageDescr) Collections(java.util.Collections) ResourceConversionResult(org.drools.compiler.compiler.ResourceConversionResult) InputStream(java.io.InputStream) RuleBuildContext(org.drools.compiler.rule.builder.RuleBuildContext) RuleDescr(org.drools.compiler.lang.descr.RuleDescr) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Aggregations

PackageRegistry (org.drools.compiler.compiler.PackageRegistry)33 InternalKnowledgePackage (org.drools.core.definitions.InternalKnowledgePackage)17 TypeDeclaration (org.drools.core.rule.TypeDeclaration)12 PackageDescr (org.drools.compiler.lang.descr.PackageDescr)11 KnowledgeBuilderImpl (org.drools.compiler.builder.impl.KnowledgeBuilderImpl)10 DialectCompiletimeRegistry (org.drools.compiler.compiler.DialectCompiletimeRegistry)7 RuleDescr (org.drools.compiler.lang.descr.RuleDescr)7 ArrayList (java.util.ArrayList)6 KnowledgeBuilderConfigurationImpl (org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl)6 CompositePackageDescr (org.drools.compiler.lang.descr.CompositePackageDescr)6 RuleBuildContext (org.drools.compiler.rule.builder.RuleBuildContext)6 KnowledgePackageImpl (org.drools.core.definitions.impl.KnowledgePackageImpl)6 RuleImpl (org.drools.core.definitions.rule.impl.RuleImpl)6 HashMap (java.util.HashMap)5 HashSet (java.util.HashSet)3 LinkedHashMap (java.util.LinkedHashMap)3 Map (java.util.Map)3 TypeDeclarationError (org.drools.compiler.compiler.TypeDeclarationError)3 TypeDeclarationDescr (org.drools.compiler.lang.descr.TypeDeclarationDescr)3 ClassObjectType (org.drools.core.base.ClassObjectType)3