use of org.drools.ancompiler.ANCConfiguration in project drools by kiegroup.
the class DMNAlphaNetworkEvaluatorCompiler method createAlphaNetworkCompiler.
private ObjectTypeNodeCompiler createAlphaNetworkCompiler(ObjectTypeNode firstObjectTypeNodeOfRete) {
ANCConfiguration ancConfiguration = new ANCConfiguration();
ancConfiguration.setDisableContextEntry(true);
ancConfiguration.setPrettyPrint(true);
ancConfiguration.setEnableModifyObject(false);
ObjectTypeNodeCompiler objectTypeNodeCompiler = new ObjectTypeNodeCompiler(ancConfiguration, firstObjectTypeNodeOfRete, true);
VariableDeclarator variableDeclarator = new VariableDeclarator(StaticJavaParser.parseType(AlphaNetworkEvaluationContext.class.getCanonicalName()), "ctx");
objectTypeNodeCompiler.addAdditionalFields(new FieldDeclaration(NodeList.nodeList(), NodeList.nodeList(variableDeclarator)));
return objectTypeNodeCompiler;
}
Aggregations