use of org.drools.compiler.lang.api.RuleDescrBuilder in project drools by kiegroup.
the class ParserHelper method end.
@SuppressWarnings("unchecked")
public <T extends DescrBuilder<?, ?>> T end(Class<T> clazz, DescrBuilder<?, ?> builder) {
if (state.backtracking == 0) {
if (!(FieldDescrBuilder.class.isAssignableFrom(clazz) || AttributeDescrBuilder.class.isAssignableFrom(clazz) || CEDescrBuilder.class.isAssignableFrom(clazz) || CollectDescrBuilder.class.isAssignableFrom(clazz) || AccumulateDescrBuilder.class.isAssignableFrom(clazz) || ForallDescrBuilder.class.isAssignableFrom(clazz) || BehaviorDescrBuilder.class.isAssignableFrom(clazz) || ConditionalBranchDescrBuilder.class.isAssignableFrom(clazz) || NamedConsequenceDescrBuilder.class.isAssignableFrom(clazz))) {
popParaphrases();
}
if (RuleDescrBuilder.class.isAssignableFrom(clazz)) {
RuleDescrBuilder ruleDescrBuilder = (RuleDescrBuilder) builder;
ruleDescrBuilder.end().getDescr().afterRuleAdded(ruleDescrBuilder.getDescr());
}
setEnd(builder);
return (T) builder;
}
return null;
}
use of org.drools.compiler.lang.api.RuleDescrBuilder in project drools by kiegroup.
the class RuleDescrBuilderImpl method lhs.
public CEDescrBuilder<RuleDescrBuilder, AndDescr> lhs() {
CEDescrBuilder<RuleDescrBuilder, AndDescr> ce = new CEDescrBuilderImpl<RuleDescrBuilder, AndDescr>(this, new AndDescr());
descr.setLhs(ce.getDescr());
return ce;
}
Aggregations