use of org.drools.modelcompiler.builder.generator.ModelGenerator.BIND_AS_CALL in project drools by kiegroup.
the class AccumulateVisitorFlowDSL method buildBinding.
@Override
protected MethodCallExpr buildBinding(String bindingName, Collection<String> usedDeclaration, Expression expression) {
MethodCallExpr bindDSL = new MethodCallExpr(null, BIND_CALL);
bindDSL.addArgument(toVar(bindingName));
MethodCallExpr bindAsDSL = new MethodCallExpr(bindDSL, BIND_AS_CALL);
usedDeclaration.stream().map(d -> new NameExpr(toVar(d))).forEach(bindAsDSL::addArgument);
bindAsDSL.addArgument(buildConstraintExpression(expression, usedDeclaration));
return bindAsDSL;
}
Aggregations