use of org.drools.verifier.visitor.PackageDescrVisitor in project drools by kiegroup.
the class TestBaseOld method getTestData.
@SuppressWarnings("unchecked")
public Collection<? extends Object> getTestData(InputStream stream, VerifierData data) throws Exception {
Reader drlReader = new InputStreamReader(stream);
PackageDescr descr = new DrlParser(LanguageLevelOption.DRL5).parse(drlReader);
PackageDescrVisitor packageDescrVisitor = new PackageDescrVisitor(data, Collections.EMPTY_LIST);
packageDescrVisitor.visitPackageDescr(descr);
// Rules with relations
return data.getAll();
}
use of org.drools.verifier.visitor.PackageDescrVisitor in project drools by kiegroup.
the class TestBase method setUp.
@Before
public void setUp() throws Exception {
verifierData = VerifierReportFactory.newVerifierData();
packageDescrVisitor = new PackageDescrVisitor(verifierData, Collections.<JarInputStream>emptyList());
}
use of org.drools.verifier.visitor.PackageDescrVisitor in project drools by kiegroup.
the class VerifierImpl method addPackageDescr.
/*
* (non-Javadoc)
*
* @seeorg.drools.verifier.Verifier#addPackageDescr(org.kie.lang.descr.
* PackageDescr)
*/
public void addPackageDescr(PackageDescr descr) {
try {
PackageDescrVisitor ruleFlattener = new PackageDescrVisitor(result.getVerifierData(), jars);
ruleFlattener.visitPackageDescr(descr);
} catch (Throwable t) {
t.printStackTrace();
}
}
Aggregations