Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.drools.impl.adapters;
 
 import  org.kie.internal.definition.KnowledgePackage;
 
import static org.drools.impl.adapters.FactTypeAdapter.adaptFactTypes;
import static org.drools.impl.adapters.GlobalAdapter.adaptGlobals;
import static org.drools.impl.adapters.ProcessAdapter.adaptProcesses;
import static org.drools.impl.adapters.QueryAdapter.adaptQueries;
import static org.drools.impl.adapters.RuleAdapter.adaptRules;
    private final KnowledgePackage delegate;
    public KnowledgePackageAdapter(KnowledgePackage delegate) {
        this. = delegate;
    }
    public String getName() {
        return .getName();
    }
    public Collection<RulegetRules() {
        return adaptRules(.getRules());
    }
    public Collection<ProcessgetProcesses() {
        return adaptProcesses(.getProcesses());
    }
    public Collection<FactTypegetFactTypes() {
        return adaptFactTypes(.getFactTypes());
    }
    public Collection<QuerygetQueries() {
        return adaptQueries(.getQueries());
    }
    public Collection<StringgetFunctionNames() {
        return .getFunctionNames();
    }
    public Collection<GlobalgetGlobalVariables() {
        return adaptGlobals(.getGlobalVariables());
    }
    public KnowledgePackage getDelegate() {
        return ;
    }
    public static List<org.drools.definition.KnowledgePackageadaptKnowledgePackages(Collection<KnowledgePackage> pkgs) {
        for (KnowledgePackage pkg : pkgs) {
            result.add(new KnowledgePackageAdapter(pkg));
        }
        return result;
    }
    public static Collection<KnowledgePackage> fromKiePackages(Collection<org.drools.definition.KnowledgePackagepkgs) {
        List<KnowledgePackage> result = new ArrayList<KnowledgePackage>();
        for (org.drools.definition.KnowledgePackage pkg : pkgs) {
            result.add(((KnowledgePackageAdapter)pkg).getDelegate());
        }
        return result;
    }
New to GrepCode? Check out our FAQ X