Search in sources :

Example 6 with FieldAccessExpr

use of org.drools.javaparser.ast.expr.FieldAccessExpr in project drools by kiegroup.

the class AccumulateVisitor method visitAccInlineCustomCode.

/**
 * By design this legacy accumulate (with inline custome code) visitor supports only with 1-and-only binding in the accumulate code/expressions.
 */
protected void visitAccInlineCustomCode(RuleContext context2, AccumulateDescr descr, MethodCallExpr accumulateDSL, PatternDescr basePattern, PatternDescr inputDescr) {
    context.pushExprPointer(accumulateDSL::addArgument);
    final MethodCallExpr functionDSL = new MethodCallExpr(null, "accFunction");
    String code = null;
    try {
        code = new String(IoUtils.readBytesFromInputStream(this.getClass().getResourceAsStream("/AccumulateInlineFunction.java")));
    } catch (IOException e1) {
        e1.printStackTrace();
        throw new RuntimeException("Unable to locate template.");
    }
    String targetClassName = StringUtil.toId(context2.getRuleDescr().getName()) + "Accumulate" + descr.getLine();
    code = code.replaceAll("AccumulateInlineFunction", targetClassName);
    CompilationUnit templateCU = JavaParser.parse(code);
    ClassOrInterfaceDeclaration templateClass = templateCU.getClassByName(targetClassName).orElseThrow(() -> new RuntimeException("Template did not contain expected type definition."));
    ClassOrInterfaceDeclaration templateContextClass = templateClass.getMembers().stream().filter(m -> m instanceof ClassOrInterfaceDeclaration && ((ClassOrInterfaceDeclaration) m).getNameAsString().equals("ContextData")).map(ClassOrInterfaceDeclaration.class::cast).findFirst().orElseThrow(() -> new RuntimeException("Template did not contain expected type definition."));
    List<String> contextFieldNames = new ArrayList<>();
    MethodDeclaration initMethod = templateClass.getMethodsByName("init").get(0);
    BlockStmt initBlock = JavaParser.parseBlock("{" + descr.getInitCode() + "}");
    for (Statement stmt : initBlock.getStatements()) {
        if (stmt instanceof ExpressionStmt && ((ExpressionStmt) stmt).getExpression() instanceof VariableDeclarationExpr) {
            VariableDeclarationExpr vdExpr = (VariableDeclarationExpr) ((ExpressionStmt) stmt).getExpression();
            for (VariableDeclarator vd : vdExpr.getVariables()) {
                contextFieldNames.add(vd.getNameAsString());
                templateContextClass.addField(vd.getType(), vd.getNameAsString(), Modifier.PUBLIC);
                if (vd.getInitializer().isPresent()) {
                    Expression initializer = vd.getInitializer().get();
                    Expression target = new FieldAccessExpr(new NameExpr("data"), vd.getNameAsString());
                    Statement initStmt = new ExpressionStmt(new AssignExpr(target, initializer, AssignExpr.Operator.ASSIGN));
                    initMethod.getBody().get().addStatement(initStmt);
                }
            }
        } else {
            // add as-is.
            initMethod.getBody().get().addStatement(stmt);
        }
    }
    Type singleAccumulateType = JavaParser.parseType("java.lang.Object");
    MethodDeclaration accumulateMethod = templateClass.getMethodsByName("accumulate").get(0);
    BlockStmt actionBlock = JavaParser.parseBlock("{" + descr.getActionCode() + "}");
    Collection<String> allNamesInActionBlock = collectNamesInBlock(context2, actionBlock);
    if (allNamesInActionBlock.size() == 1) {
        String nameExpr = allNamesInActionBlock.iterator().next();
        accumulateMethod.getParameter(1).setName(nameExpr);
        singleAccumulateType = context2.getDeclarationById(nameExpr).get().getType();
    } else {
        new LegacyAccumulate(context, descr, basePattern).build();
        return;
    }
    writeAccumulateMethod(contextFieldNames, singleAccumulateType, accumulateMethod, actionBlock);
    // <result expression>: this is a semantic expression in the selected dialect that is executed after all source objects are iterated.
    MethodDeclaration resultMethod = templateClass.getMethodsByName("getResult").get(0);
    Type returnExpressionType = JavaParser.parseType("java.lang.Object");
    Expression returnExpression = JavaParser.parseExpression(descr.getResultCode());
    if (returnExpression instanceof NameExpr) {
        returnExpression = new EnclosedExpr(returnExpression);
    }
    rescopeNamesToNewScope(new NameExpr("data"), contextFieldNames, returnExpression);
    resultMethod.getBody().get().addStatement(new ReturnStmt(returnExpression));
    MethodDeclaration getResultTypeMethod = templateClass.getMethodsByName("getResultType").get(0);
    getResultTypeMethod.getBody().get().addStatement(new ReturnStmt(new ClassExpr(returnExpressionType)));
    if (descr.getReverseCode() != null) {
        MethodDeclaration supportsReverseMethod = templateClass.getMethodsByName("supportsReverse").get(0);
        supportsReverseMethod.getBody().get().addStatement(JavaParser.parseStatement("return true;"));
        MethodDeclaration reverseMethod = templateClass.getMethodsByName("reverse").get(0);
        BlockStmt reverseBlock = JavaParser.parseBlock("{" + descr.getReverseCode() + "}");
        Collection<String> allNamesInReverseBlock = collectNamesInBlock(context2, reverseBlock);
        if (allNamesInReverseBlock.size() == 1) {
            reverseMethod.getParameter(1).setName(allNamesInReverseBlock.iterator().next());
        } else {
            new LegacyAccumulate(context, descr, basePattern).build();
            return;
        }
        writeAccumulateMethod(contextFieldNames, singleAccumulateType, reverseMethod, reverseBlock);
    } else {
        MethodDeclaration supportsReverseMethod = templateClass.getMethodsByName("supportsReverse").get(0);
        supportsReverseMethod.getBody().get().addStatement(JavaParser.parseStatement("return false;"));
        MethodDeclaration reverseMethod = templateClass.getMethodsByName("reverse").get(0);
        reverseMethod.getBody().get().addStatement(JavaParser.parseStatement("throw new UnsupportedOperationException(\"This function does not support reverse.\");"));
    }
    // add resulting accumulator class into the package model
    this.packageModel.addGeneratedPOJO(templateClass);
    functionDSL.addArgument(new ClassExpr(JavaParser.parseType(targetClassName)));
    functionDSL.addArgument(new NameExpr(toVar(inputDescr.getIdentifier())));
    final String bindingId = basePattern.getIdentifier();
    final MethodCallExpr asDSL = new MethodCallExpr(functionDSL, "as");
    asDSL.addArgument(new NameExpr(toVar(bindingId)));
    accumulateDSL.addArgument(asDSL);
    context.popExprPointer();
}
Also used : Expression(org.drools.javaparser.ast.expr.Expression) ModelGeneratorVisitor(org.drools.modelcompiler.builder.generator.visitor.ModelGeneratorVisitor) DeclarationSpec(org.drools.modelcompiler.builder.generator.DeclarationSpec) DrlxParseUtil(org.drools.modelcompiler.builder.generator.DrlxParseUtil) JavaParser(org.drools.javaparser.JavaParser) BinaryExpr(org.drools.javaparser.ast.expr.BinaryExpr) DrlxParseUtil.toType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.toType) AccumulateUtil(org.drools.compiler.rule.builder.util.AccumulateUtil) AccumulateFunction(org.kie.api.runtime.rule.AccumulateFunction) DrlxParseUtil.forceCastForName(org.drools.modelcompiler.builder.generator.DrlxParseUtil.forceCastForName) FieldAccessExpr(org.drools.javaparser.ast.expr.FieldAccessExpr) ExpressionStmt(org.drools.javaparser.ast.stmt.ExpressionStmt) DrlxParseUtil.toVar(org.drools.modelcompiler.builder.generator.DrlxParseUtil.toVar) ConstraintParser(org.drools.modelcompiler.builder.generator.drlxparse.ConstraintParser) Statement(org.drools.javaparser.ast.stmt.Statement) PackageModel(org.drools.modelcompiler.builder.PackageModel) Parameter(org.drools.javaparser.ast.body.Parameter) Collection(java.util.Collection) ClassExpr(org.drools.javaparser.ast.expr.ClassExpr) NameExpr(org.drools.javaparser.ast.expr.NameExpr) VariableDeclarationExpr(org.drools.javaparser.ast.expr.VariableDeclarationExpr) UnknownType(org.drools.javaparser.ast.type.UnknownType) List(java.util.List) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) Optional(java.util.Optional) DrlxParseFail(org.drools.modelcompiler.builder.generator.drlxparse.DrlxParseFail) DrlxParseResult(org.drools.modelcompiler.builder.generator.drlxparse.DrlxParseResult) AbstractExpressionBuilder(org.drools.modelcompiler.builder.generator.expression.AbstractExpressionBuilder) DrlxParseSuccess(org.drools.modelcompiler.builder.generator.drlxparse.DrlxParseSuccess) DrlxParseUtil.rescopeNamesToNewScope(org.drools.modelcompiler.builder.generator.DrlxParseUtil.rescopeNamesToNewScope) ReturnStmt(org.drools.javaparser.ast.stmt.ReturnStmt) BlockStmt(org.drools.javaparser.ast.stmt.BlockStmt) ArrayList(java.util.ArrayList) AssignExpr(org.drools.javaparser.ast.expr.AssignExpr) IoUtils(org.drools.core.util.IoUtils) MethodCallExpr(org.drools.javaparser.ast.expr.MethodCallExpr) StringUtil(org.drools.modelcompiler.util.StringUtil) MethodDeclaration(org.drools.javaparser.ast.body.MethodDeclaration) LambdaExpr(org.drools.javaparser.ast.expr.LambdaExpr) ClassOrInterfaceDeclaration(org.drools.javaparser.ast.body.ClassOrInterfaceDeclaration) EnclosedExpr(org.drools.javaparser.ast.expr.EnclosedExpr) AccumulateDescr(org.drools.compiler.lang.descr.AccumulateDescr) VariableDeclarator(org.drools.javaparser.ast.body.VariableDeclarator) IOException(java.io.IOException) BaseDescr(org.drools.compiler.lang.descr.BaseDescr) CompilationUnit(org.drools.javaparser.ast.CompilationUnit) Type(org.drools.javaparser.ast.type.Type) PatternDescr(org.drools.compiler.lang.descr.PatternDescr) RuleContext(org.drools.modelcompiler.builder.generator.RuleContext) Collectors.toList(java.util.stream.Collectors.toList) ParseResultVisitor(org.drools.modelcompiler.builder.generator.drlxparse.ParseResultVisitor) Modifier(org.drools.javaparser.ast.Modifier) ClassOrInterfaceDeclaration(org.drools.javaparser.ast.body.ClassOrInterfaceDeclaration) ArrayList(java.util.ArrayList) NameExpr(org.drools.javaparser.ast.expr.NameExpr) ExpressionStmt(org.drools.javaparser.ast.stmt.ExpressionStmt) VariableDeclarator(org.drools.javaparser.ast.body.VariableDeclarator) AssignExpr(org.drools.javaparser.ast.expr.AssignExpr) FieldAccessExpr(org.drools.javaparser.ast.expr.FieldAccessExpr) CompilationUnit(org.drools.javaparser.ast.CompilationUnit) VariableDeclarationExpr(org.drools.javaparser.ast.expr.VariableDeclarationExpr) MethodDeclaration(org.drools.javaparser.ast.body.MethodDeclaration) Statement(org.drools.javaparser.ast.stmt.Statement) BlockStmt(org.drools.javaparser.ast.stmt.BlockStmt) IOException(java.io.IOException) DrlxParseUtil.toType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.toType) UnknownType(org.drools.javaparser.ast.type.UnknownType) Type(org.drools.javaparser.ast.type.Type) Expression(org.drools.javaparser.ast.expr.Expression) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) ClassExpr(org.drools.javaparser.ast.expr.ClassExpr) EnclosedExpr(org.drools.javaparser.ast.expr.EnclosedExpr) ReturnStmt(org.drools.javaparser.ast.stmt.ReturnStmt) MethodCallExpr(org.drools.javaparser.ast.expr.MethodCallExpr)

Example 7 with FieldAccessExpr

use of org.drools.javaparser.ast.expr.FieldAccessExpr in project drools by kiegroup.

the class DrlxParseUtil method toMethodCallWithClassCheck.

public static TypedExpression toMethodCallWithClassCheck(RuleContext context, Expression expr, String bindingId, Class<?> clazz, TypeResolver typeResolver) {
    final Deque<ParsedMethod> callStackLeftToRight = new LinkedList<>();
    createExpressionCall(expr, callStackLeftToRight);
    Class<?> previousClass = clazz;
    Expression previousScope = null;
    for (ParsedMethod e : callStackLeftToRight) {
        if (e.expression instanceof NameExpr || e.expression instanceof FieldAccessExpr) {
            if (e.fieldToResolve.equals(bindingId)) {
                continue;
            }
            if (previousClass == null) {
                try {
                    previousClass = typeResolver.resolveType(e.fieldToResolve);
                    previousScope = new NameExpr(e.fieldToResolve);
                } catch (ClassNotFoundException e1) {
                // ignore
                }
                if (previousClass == null) {
                    previousClass = context.getDeclarationById(e.fieldToResolve).map(DeclarationSpec::getDeclarationClass).orElseThrow(() -> new RuntimeException("Unknown field: " + e.fieldToResolve));
                    previousScope = e.expression;
                }
            } else {
                TypedExpression te = nameExprToMethodCallExpr(e.fieldToResolve, previousClass, previousScope);
                Class<?> returnType = te.getType();
                previousScope = te.getExpression();
                previousClass = returnType;
            }
        } else if (e.expression instanceof MethodCallExpr) {
            Class<?> returnType = returnTypeOfMethodCallExpr(context, typeResolver, (MethodCallExpr) e.expression, previousClass, null);
            MethodCallExpr cloned = ((MethodCallExpr) e.expression.clone()).setScope(previousScope);
            previousScope = cloned;
            previousClass = returnType;
        }
    }
    return new TypedExpression(previousScope, previousClass);
}
Also used : ExpressionTyper.findLeftLeafOfNameExpr(org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.findLeftLeafOfNameExpr) NameExpr(org.drools.javaparser.ast.expr.NameExpr) LinkedList(java.util.LinkedList) Expression(org.drools.javaparser.ast.expr.Expression) DrlxExpression(org.drools.javaparser.ast.drlx.expr.DrlxExpression) FieldAccessExpr(org.drools.javaparser.ast.expr.FieldAccessExpr) MethodCallExpr(org.drools.javaparser.ast.expr.MethodCallExpr)

Example 8 with FieldAccessExpr

use of org.drools.javaparser.ast.expr.FieldAccessExpr in project drools by kiegroup.

the class DrlxParseUtil method createExpressionCall.

private static Expression createExpressionCall(Expression expr, Deque<ParsedMethod> expressions) {
    if (expr instanceof NodeWithSimpleName) {
        NodeWithSimpleName fae = (NodeWithSimpleName) expr;
        expressions.push(new ParsedMethod(expr, fae.getName().asString()));
    }
    if (expr instanceof NodeWithOptionalScope) {
        final NodeWithOptionalScope<?> exprWithScope = (NodeWithOptionalScope) expr;
        exprWithScope.getScope().map((Expression scope) -> createExpressionCall(scope, expressions));
    } else if (expr instanceof FieldAccessExpr) {
        // Cannot recurse over getScope() as FieldAccessExpr doesn't support the NodeWithOptionalScope,
        // it will support a new interface to traverse among scopes called NodeWithTraversableScope so
        // we can merge this and the previous branch
        createExpressionCall(((FieldAccessExpr) expr).getScope(), expressions);
    }
    return expr;
}
Also used : NodeWithSimpleName(org.drools.javaparser.ast.nodeTypes.NodeWithSimpleName) Expression(org.drools.javaparser.ast.expr.Expression) DrlxExpression(org.drools.javaparser.ast.drlx.expr.DrlxExpression) NodeWithOptionalScope(org.drools.javaparser.ast.nodeTypes.NodeWithOptionalScope) FieldAccessExpr(org.drools.javaparser.ast.expr.FieldAccessExpr)

Example 9 with FieldAccessExpr

use of org.drools.javaparser.ast.expr.FieldAccessExpr in project drools by kiegroup.

the class FlowExpressionBuilder method buildIndexedBy.

private MethodCallExpr buildIndexedBy(DrlxParseSuccess drlxParseResult, MethodCallExpr exprDSL) {
    if (!hasIndex(drlxParseResult)) {
        return exprDSL;
    }
    TypedExpression left = drlxParseResult.getLeft();
    TypedExpression right = drlxParseResult.getRight();
    Class<?> indexType = Stream.of(left, right).map(TypedExpression::getType).filter(Objects::nonNull).findFirst().get();
    ClassExpr indexedBy_indexedClass = new ClassExpr(JavaParser.parseType(indexType.getCanonicalName()));
    // not 100% accurate as the type in "nameExpr" is actually parsed if it was JavaParsers as a big chain of FieldAccessExpr
    FieldAccessExpr indexedBy_constraintType = new FieldAccessExpr(new NameExpr("org.drools.model.Index.ConstraintType"), drlxParseResult.getDecodeConstraintType().toString());
    LambdaExpr indexedBy_leftOperandExtractor = new LambdaExpr();
    indexedBy_leftOperandExtractor.addParameter(new Parameter(new UnknownType(), "_this"));
    boolean leftContainsThis = left.getExpression().toString().contains("_this");
    indexedBy_leftOperandExtractor.setBody(new ExpressionStmt(leftContainsThis ? left.getExpression() : right.getExpression()));
    MethodCallExpr indexedByDSL = new MethodCallExpr(exprDSL, INDEXED_BY_CALL);
    indexedByDSL.addArgument(indexedBy_indexedClass);
    indexedByDSL.addArgument(indexedBy_constraintType);
    indexedByDSL.addArgument("" + indexIdGenerator.getFieldId(drlxParseResult.getPatternType(), left.getFieldName()));
    indexedByDSL.addArgument(indexedBy_leftOperandExtractor);
    Collection<String> usedDeclarations = drlxParseResult.getUsedDeclarations();
    if (isAlphaIndex(usedDeclarations)) {
        indexedByDSL.addArgument(right.getExpression());
    } else {
        LambdaExpr indexedBy_rightOperandExtractor = new LambdaExpr();
        indexedBy_rightOperandExtractor.addParameter(new Parameter(new UnknownType(), usedDeclarations.iterator().next()));
        indexedBy_rightOperandExtractor.setBody(new ExpressionStmt(!leftContainsThis ? left.getExpression() : right.getExpression()));
        indexedByDSL.addArgument(indexedBy_rightOperandExtractor);
    }
    return indexedByDSL;
}
Also used : LambdaExpr(org.drools.javaparser.ast.expr.LambdaExpr) NameExpr(org.drools.javaparser.ast.expr.NameExpr) ExpressionStmt(org.drools.javaparser.ast.stmt.ExpressionStmt) UnknownType(org.drools.javaparser.ast.type.UnknownType) Objects(java.util.Objects) Parameter(org.drools.javaparser.ast.body.Parameter) ClassExpr(org.drools.javaparser.ast.expr.ClassExpr) FieldAccessExpr(org.drools.javaparser.ast.expr.FieldAccessExpr) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) MethodCallExpr(org.drools.javaparser.ast.expr.MethodCallExpr)

Example 10 with FieldAccessExpr

use of org.drools.javaparser.ast.expr.FieldAccessExpr in project drools by kiegroup.

the class PatternExpressionBuilder method buildIndexedBy.

private Optional<MethodCallExpr> buildIndexedBy(DrlxParseSuccess drlxParseResult) {
    if (!hasIndex(drlxParseResult)) {
        return Optional.empty();
    }
    IndexUtil.ConstraintType decodeConstraintType = drlxParseResult.getDecodeConstraintType();
    TypedExpression left = drlxParseResult.getLeft();
    TypedExpression right = drlxParseResult.getRight();
    Class<?> indexType = Stream.of(left, right).map(TypedExpression::getType).filter(Objects::nonNull).findFirst().get();
    ClassExpr indexedBy_indexedClass = new ClassExpr(JavaParser.parseType(indexType.getCanonicalName()));
    // not 100% accurate as the type in "nameExpr" is actually parsed if it was JavaParsers as a big chain of FieldAccessExpr
    FieldAccessExpr indexedBy_constraintType = new FieldAccessExpr(new NameExpr("org.drools.model.Index.ConstraintType"), decodeConstraintType.toString());
    LambdaExpr indexedBy_leftOperandExtractor = new LambdaExpr();
    indexedBy_leftOperandExtractor.addParameter(new Parameter(new UnknownType(), "_this"));
    boolean leftContainsThis = left.getExpression().toString().contains("_this");
    indexedBy_leftOperandExtractor.setBody(new ExpressionStmt(leftContainsThis ? left.getExpression() : right.getExpression()));
    MethodCallExpr indexedByDSL = new MethodCallExpr(null, drlxParseResult.isBetaNode() ? BETA_INDEXED_BY_CALL : ALPHA_INDEXED_BY_CALL);
    indexedByDSL.addArgument(indexedBy_indexedClass);
    indexedByDSL.addArgument(indexedBy_constraintType);
    indexedByDSL.addArgument("" + indexIdGenerator.getFieldId(drlxParseResult.getPatternType(), left.getFieldName()));
    indexedByDSL.addArgument(indexedBy_leftOperandExtractor);
    Collection<String> usedDeclarations = drlxParseResult.getUsedDeclarations();
    if (isAlphaIndex(usedDeclarations)) {
        indexedByDSL.addArgument(right.getExpression());
    } else if (usedDeclarations.size() == 1) {
        LambdaExpr indexedBy_rightOperandExtractor = new LambdaExpr();
        indexedBy_rightOperandExtractor.addParameter(new Parameter(new UnknownType(), usedDeclarations.iterator().next()));
        indexedBy_rightOperandExtractor.setBody(new ExpressionStmt(!leftContainsThis ? left.getExpression() : right.getExpression()));
        indexedByDSL.addArgument(indexedBy_rightOperandExtractor);
    }
    return Optional.of(indexedByDSL);
}
Also used : IndexUtil(org.drools.core.util.index.IndexUtil) LambdaExpr(org.drools.javaparser.ast.expr.LambdaExpr) NameExpr(org.drools.javaparser.ast.expr.NameExpr) ExpressionStmt(org.drools.javaparser.ast.stmt.ExpressionStmt) UnknownType(org.drools.javaparser.ast.type.UnknownType) Objects(java.util.Objects) Parameter(org.drools.javaparser.ast.body.Parameter) ClassExpr(org.drools.javaparser.ast.expr.ClassExpr) FieldAccessExpr(org.drools.javaparser.ast.expr.FieldAccessExpr) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) MethodCallExpr(org.drools.javaparser.ast.expr.MethodCallExpr)

Aggregations

FieldAccessExpr (org.drools.javaparser.ast.expr.FieldAccessExpr)12 MethodCallExpr (org.drools.javaparser.ast.expr.MethodCallExpr)10 Expression (org.drools.javaparser.ast.expr.Expression)9 NameExpr (org.drools.javaparser.ast.expr.NameExpr)9 TypedExpression (org.drools.modelcompiler.builder.generator.TypedExpression)8 BinaryExpr (org.drools.javaparser.ast.expr.BinaryExpr)5 EnclosedExpr (org.drools.javaparser.ast.expr.EnclosedExpr)5 ArrayList (java.util.ArrayList)4 Optional (java.util.Optional)4 DrlxExpression (org.drools.javaparser.ast.drlx.expr.DrlxExpression)4 InlineCastExpr (org.drools.javaparser.ast.drlx.expr.InlineCastExpr)4 NullSafeFieldAccessExpr (org.drools.javaparser.ast.drlx.expr.NullSafeFieldAccessExpr)4 DrlxParseUtil.nameExprToMethodCallExpr (org.drools.modelcompiler.builder.generator.DrlxParseUtil.nameExprToMethodCallExpr)4 List (java.util.List)3 Node (org.drools.javaparser.ast.Node)3 HalfBinaryExpr (org.drools.javaparser.ast.drlx.expr.HalfBinaryExpr)3 CastExpr (org.drools.javaparser.ast.expr.CastExpr)3 StringLiteralExpr (org.drools.javaparser.ast.expr.StringLiteralExpr)3 ThisExpr (org.drools.javaparser.ast.expr.ThisExpr)3 UnaryExpr (org.drools.javaparser.ast.expr.UnaryExpr)3