use of org.drools.compiler.lang.descr.PatternDestinationDescr in project drools by kiegroup.
the class PatternHandler method end.
public Object end(final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
final Element element = parser.endElementBuilder();
final PatternDescr patternDescr = (PatternDescr) parser.getCurrent();
final Object parent = parser.getParent();
if (parent instanceof PatternDestinationDescr) {
final PatternDestinationDescr parentDescr = (PatternDestinationDescr) parent;
parentDescr.setInputPattern(patternDescr);
} else {
final ConditionalElementDescr parentDescr = (ConditionalElementDescr) parent;
parentDescr.addDescr(patternDescr);
}
return patternDescr;
}
Aggregations