use of org.drools.modelcompiler.builder.generator.OOPathExprGenerator in project drools by kiegroup.
the class ConstraintOOPath method buildPattern.
@Override
public void buildPattern() {
final String patternIdentifierGenerated;
// If the outer pattern does not have a binding we generate it
if (patternConstraintParseResult.getPatternIdentifier() != null) {
patternIdentifierGenerated = patternConstraintParseResult.getPatternIdentifier();
} else {
patternIdentifierGenerated = context.getExprId(patternType, expression);
context.addDeclaration(new DeclarationSpec(patternIdentifierGenerated, patternType, Optional.of(pattern), Optional.empty()));
}
new OOPathExprGenerator(context, packageModel).visit(patternType, patternIdentifierGenerated, drlxParseResult);
}
Aggregations