Search in sources :

Example 11 with EnclosedExpr

use of com.github.javaparser.ast.expr.EnclosedExpr in project checker-framework by typetools.

the class JointJavacJavaParserVisitor method visitParenthesized.

@Override
public Void visitParenthesized(ParenthesizedTree javacTree, Node javaParserNode) {
    EnclosedExpr node = castNode(EnclosedExpr.class, javaParserNode, javacTree);
    processParenthesized(javacTree, node);
    javacTree.getExpression().accept(this, node.getInner());
    return null;
}
Also used : EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr)

Example 12 with EnclosedExpr

use of com.github.javaparser.ast.expr.EnclosedExpr in project checker-framework by typetools.

the class DoubleJavaParserVisitor method visit.

@Override
public void visit(final EnclosedExpr node1, final Node other) {
    EnclosedExpr node2 = (EnclosedExpr) other;
    defaultAction(node1, node2);
    node1.getInner().accept(this, node2.getInner());
}
Also used : EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr)

Example 13 with EnclosedExpr

use of com.github.javaparser.ast.expr.EnclosedExpr in project drools by kiegroup.

the class ExpressionTyper method processFirstNode.

private Optional<TypedExpressionCursor> processFirstNode(Expression drlxExpr, List<Node> childNodes, Node firstNode, boolean isInLineCast, java.lang.reflect.Type originalTypeCursor) {
    Optional<TypedExpressionCursor> result;
    if (isThisExpression(firstNode) || (firstNode instanceof DrlNameExpr && printNode(firstNode).equals(bindingId))) {
        result = of(thisExpr(drlxExpr, childNodes, isInLineCast, originalTypeCursor));
    } else if (firstNode instanceof DrlNameExpr) {
        result = drlNameExpr(drlxExpr, (DrlNameExpr) firstNode, isInLineCast, originalTypeCursor);
    } else if (firstNode instanceof NameExpr) {
        result = drlNameExpr(drlxExpr, new DrlNameExpr(((NameExpr) firstNode).getName()), isInLineCast, originalTypeCursor);
    } else if (firstNode instanceof FieldAccessExpr) {
        if (((FieldAccessExpr) firstNode).getScope() instanceof ThisExpr) {
            result = of(fieldAccessExpr(originalTypeCursor, ((FieldAccessExpr) firstNode).getName()));
        } else {
            try {
                Class<?> resolvedType = ruleContext.getTypeResolver().resolveType(PrintUtil.printNode(firstNode));
                result = of(new TypedExpressionCursor(new NameExpr(PrintUtil.printNode(firstNode)), resolvedType));
            } catch (ClassNotFoundException e) {
                result = empty();
            }
        }
    } else if (firstNode instanceof NullSafeFieldAccessExpr && ((NullSafeFieldAccessExpr) firstNode).getScope() instanceof ThisExpr) {
        result = of(fieldAccessExpr(originalTypeCursor, ((NullSafeFieldAccessExpr) firstNode).getName()));
    } else if (firstNode instanceof MethodCallExpr) {
        Optional<Expression> scopeExpr = ((MethodCallExpr) firstNode).getScope();
        Optional<DeclarationSpec> scopeDecl = scopeExpr.flatMap(scope -> ruleContext.getDeclarationById(PrintUtil.printNode(scope)));
        Expression scope;
        java.lang.reflect.Type type;
        if (scopeDecl.isPresent() && !scopeDecl.get().getBindingId().equals(bindingId)) {
            type = scopeDecl.get().getDeclarationClass();
            scope = new NameExpr(scopeDecl.get().getBindingId());
            context.addUsedDeclarations(scopeDecl.get().getBindingId());
        } else if (scopeExpr.isPresent()) {
            TypedExpressionCursor parsedScope = processFirstNode(drlxExpr, childNodes, scopeExpr.get(), isInLineCast, originalTypeCursor).get();
            type = parsedScope.typeCursor;
            scope = parsedScope.expressionCursor;
        } else {
            type = originalTypeCursor;
            scope = new NameExpr(THIS_PLACEHOLDER);
        }
        result = of(methodCallExpr((MethodCallExpr) firstNode, type, scope));
    } else if (firstNode instanceof ObjectCreationExpr) {
        result = of(objectCreationExpr((ObjectCreationExpr) firstNode));
    } else if (firstNode instanceof StringLiteralExpr) {
        result = of(stringLiteralExpr((StringLiteralExpr) firstNode));
    } else if (firstNode instanceof EnclosedExpr) {
        result = processFirstNode(drlxExpr, childNodes, ((EnclosedExpr) firstNode).getInner(), isInLineCast, originalTypeCursor);
    } else if (firstNode instanceof CastExpr) {
        result = castExpr((CastExpr) firstNode, drlxExpr, childNodes, isInLineCast, originalTypeCursor);
    } else if (firstNode instanceof ArrayCreationExpr) {
        result = of(arrayCreationExpr(((ArrayCreationExpr) firstNode)));
    } else if (firstNode instanceof BinaryExpr) {
        result = of(binaryExpr((BinaryExpr) firstNode));
    } else if (firstNode instanceof ArrayAccessExpr) {
        Optional<DeclarationSpec> scopeDecl = ruleContext.getDeclarationById(((ArrayAccessExpr) firstNode).getName().toString());
        Expression scope;
        java.lang.reflect.Type type;
        if (scopeDecl.isPresent() && !scopeDecl.get().getBindingId().equals(bindingId)) {
            type = scopeDecl.get().getDeclarationClass();
            scope = new NameExpr(scopeDecl.get().getBindingId());
            context.addUsedDeclarations(scopeDecl.get().getBindingId());
        } else {
            type = originalTypeCursor;
            scope = new NameExpr(THIS_PLACEHOLDER);
        }
        result = arrayAccessExpr((ArrayAccessExpr) firstNode, type, scope);
    } else if (firstNode instanceof MapCreationLiteralExpression) {
        result = mapCreationLiteral((MapCreationLiteralExpression) firstNode, originalTypeCursor);
    } else if (firstNode instanceof ListCreationLiteralExpression) {
        result = listCreationLiteral((ListCreationLiteralExpression) firstNode, originalTypeCursor);
    } else {
        result = of(new TypedExpressionCursor((Expression) firstNode, getExpressionType(ruleContext, ruleContext.getTypeResolver(), (Expression) firstNode, context.getUsedDeclarations())));
    }
    if (result.isPresent()) {
        processNullSafeDereferencing(drlxExpr);
    }
    return result.map(te -> {
        if (isInLineCast) {
            Expression exprWithInlineCast = addCastToExpression(toRawClass(te.typeCursor), te.expressionCursor, isInLineCast);
            return new TypedExpressionCursor(exprWithInlineCast, te.typeCursor);
        } else {
            return te;
        }
    });
}
Also used : ArrayAccessExpr(com.github.javaparser.ast.expr.ArrayAccessExpr) Arrays(java.util.Arrays) ClassExpr(com.github.javaparser.ast.expr.ClassExpr) HalfPointFreeExpr(org.drools.mvel.parser.ast.expr.HalfPointFreeExpr) DrlxParseUtil.findRootNodeViaParent(org.drools.modelcompiler.builder.generator.DrlxParseUtil.findRootNodeViaParent) DeclarationSpec(org.drools.modelcompiler.builder.generator.DeclarationSpec) DrlxParseUtil(org.drools.modelcompiler.builder.generator.DrlxParseUtil) NodeList.nodeList(com.github.javaparser.ast.NodeList.nodeList) Optional.of(java.util.Optional.of) InstanceOfExpr(com.github.javaparser.ast.expr.InstanceOfExpr) NullLiteralExpr(com.github.javaparser.ast.expr.NullLiteralExpr) ParseExpressionErrorResult(org.drools.modelcompiler.builder.errors.ParseExpressionErrorResult) FlattenScope.flattenScope(org.drools.modelcompiler.builder.generator.expressiontyper.FlattenScope.flattenScope) LiteralExpr(com.github.javaparser.ast.expr.LiteralExpr) CharLiteralExpr(com.github.javaparser.ast.expr.CharLiteralExpr) Type(com.github.javaparser.ast.type.Type) ObjectCreationExpr(com.github.javaparser.ast.expr.ObjectCreationExpr) Map(java.util.Map) Expression(com.github.javaparser.ast.expr.Expression) FlattenScope.transformFullyQualifiedInlineCastExpr(org.drools.modelcompiler.builder.generator.expressiontyper.FlattenScope.transformFullyQualifiedInlineCastExpr) ClassUtil.toRawClass(org.drools.modelcompiler.util.ClassUtil.toRawClass) DrlxParseUtil.getClassFromContext(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getClassFromContext) OperatorSpec(org.drools.modelcompiler.builder.generator.operatorspec.OperatorSpec) OOPathExpr(org.drools.mvel.parser.ast.expr.OOPathExpr) PackageModel(org.drools.modelcompiler.builder.PackageModel) SimpleName(com.github.javaparser.ast.expr.SimpleName) ArrayCreationExpr(com.github.javaparser.ast.expr.ArrayCreationExpr) DrlxParseUtil.getExpressionType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getExpressionType) MethodCallExpr(com.github.javaparser.ast.expr.MethodCallExpr) MapCreationLiteralExpressionKeyValuePair(org.drools.mvel.parser.ast.expr.MapCreationLiteralExpressionKeyValuePair) MethodUtils(org.drools.core.util.MethodUtils) UnaryExpr(com.github.javaparser.ast.expr.UnaryExpr) BlockStmt(com.github.javaparser.ast.stmt.BlockStmt) ArrayInitializerExpr(com.github.javaparser.ast.expr.ArrayInitializerExpr) Optional.empty(java.util.Optional.empty) DrlxParseUtil.replaceAllHalfBinaryChildren(org.drools.modelcompiler.builder.generator.DrlxParseUtil.replaceAllHalfBinaryChildren) PrintUtil.printNode(org.drools.mvel.parser.printer.PrintUtil.printNode) CastExpr(com.github.javaparser.ast.expr.CastExpr) ArrayList(java.util.ArrayList) NullSafeMethodCallExpr(org.drools.mvel.parser.ast.expr.NullSafeMethodCallExpr) DrlxParseUtil.transformDrlNameExprToNameExpr(org.drools.modelcompiler.builder.generator.DrlxParseUtil.transformDrlNameExprToNameExpr) ListCreationLiteralExpressionElement(org.drools.mvel.parser.ast.expr.ListCreationLiteralExpressionElement) UnificationTypedExpression(org.drools.modelcompiler.builder.generator.UnificationTypedExpression) TypeVariable(java.lang.reflect.TypeVariable) NativeOperatorSpec(org.drools.modelcompiler.builder.generator.operatorspec.NativeOperatorSpec) DrlxParseUtil.toClassOrInterfaceType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.toClassOrInterfaceType) DrlNameExpr(org.drools.mvel.parser.ast.expr.DrlNameExpr) InlineCastExpr(org.drools.mvel.parser.ast.expr.InlineCastExpr) NameExpr(com.github.javaparser.ast.expr.NameExpr) Field(java.lang.reflect.Field) InitializerDeclaration(com.github.javaparser.ast.body.InitializerDeclaration) ParameterizedType(java.lang.reflect.ParameterizedType) ModelGenerator(org.drools.modelcompiler.builder.generator.ModelGenerator) MapCreationLiteralExpression(org.drools.mvel.parser.ast.expr.MapCreationLiteralExpression) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) DrlxParseUtil.prepend(org.drools.modelcompiler.builder.generator.DrlxParseUtil.prepend) DrlxParseUtil.getClassFromType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getClassFromType) TypeResolver(org.drools.core.addon.TypeResolver) TemporalOperatorSpec(org.drools.modelcompiler.builder.generator.operatorspec.TemporalOperatorSpec) LoggerFactory(org.slf4j.LoggerFactory) ThisExpr(com.github.javaparser.ast.expr.ThisExpr) InvalidExpressionErrorResult(org.drools.modelcompiler.builder.errors.InvalidExpressionErrorResult) ClassUtils.getter2property(org.drools.core.util.ClassUtils.getter2property) DrlxParseUtil.isThisExpression(org.drools.modelcompiler.builder.generator.DrlxParseUtil.isThisExpression) CustomOperatorSpec(org.drools.modelcompiler.builder.generator.operatorspec.CustomOperatorSpec) BinaryExpr(com.github.javaparser.ast.expr.BinaryExpr) Method(java.lang.reflect.Method) Node(com.github.javaparser.ast.Node) NodeList(com.github.javaparser.ast.NodeList) ReferenceType(com.github.javaparser.ast.type.ReferenceType) HalfBinaryExpr(org.drools.mvel.parser.ast.expr.HalfBinaryExpr) ListCreationLiteralExpression(org.drools.mvel.parser.ast.expr.ListCreationLiteralExpression) OOPathChunk(org.drools.mvel.parser.ast.expr.OOPathChunk) FullyQualifiedInlineCastExpr(org.drools.mvel.parser.ast.expr.FullyQualifiedInlineCastExpr) DrlxParseUtil.safeResolveType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.safeResolveType) THIS_PLACEHOLDER(org.drools.modelcompiler.builder.generator.DrlxParseUtil.THIS_PLACEHOLDER) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr) List(java.util.List) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) DrlxParseUtil.nameExprToMethodCallExpr(org.drools.modelcompiler.builder.generator.DrlxParseUtil.nameExprToMethodCallExpr) Modifier(java.lang.reflect.Modifier) Optional(java.util.Optional) MvelParser.parseType(org.drools.mvel.parser.MvelParser.parseType) FieldAccessExpr(com.github.javaparser.ast.expr.FieldAccessExpr) DrlxParseUtil.toStringLiteral(org.drools.modelcompiler.builder.generator.DrlxParseUtil.toStringLiteral) NodeWithArguments(com.github.javaparser.ast.nodeTypes.NodeWithArguments) HashMap(java.util.HashMap) ClassUtils.extractGenericType(org.drools.core.util.ClassUtils.extractGenericType) PointFreeExpr(org.drools.mvel.parser.ast.expr.PointFreeExpr) DoubleLiteralExpr(com.github.javaparser.ast.expr.DoubleLiteralExpr) DrlxParseUtil.getLiteralExpressionType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getLiteralExpressionType) ClassUtil.getTypeArgument(org.drools.modelcompiler.util.ClassUtil.getTypeArgument) RuleUnitUtil.isDataSource(org.kie.internal.ruleunit.RuleUnitUtil.isDataSource) NoSuchElementException(java.util.NoSuchElementException) Logger(org.slf4j.Logger) AssignExpr(com.github.javaparser.ast.expr.AssignExpr) NullSafeFieldAccessExpr(org.drools.mvel.parser.ast.expr.NullSafeFieldAccessExpr) PrintUtil(org.drools.mvel.parser.printer.PrintUtil) RuleContext(org.drools.modelcompiler.builder.generator.RuleContext) DrlxParseUtil.trasformHalfBinaryToBinary(org.drools.modelcompiler.builder.generator.DrlxParseUtil.trasformHalfBinaryToBinary) BigDecimalArgumentCoercion(org.drools.mvelcompiler.util.BigDecimalArgumentCoercion) ObjectCreationExpr(com.github.javaparser.ast.expr.ObjectCreationExpr) DrlxParseUtil.transformDrlNameExprToNameExpr(org.drools.modelcompiler.builder.generator.DrlxParseUtil.transformDrlNameExprToNameExpr) DrlNameExpr(org.drools.mvel.parser.ast.expr.DrlNameExpr) NameExpr(com.github.javaparser.ast.expr.NameExpr) StringLiteralExpr(com.github.javaparser.ast.expr.StringLiteralExpr) FlattenScope.transformFullyQualifiedInlineCastExpr(org.drools.modelcompiler.builder.generator.expressiontyper.FlattenScope.transformFullyQualifiedInlineCastExpr) CastExpr(com.github.javaparser.ast.expr.CastExpr) InlineCastExpr(org.drools.mvel.parser.ast.expr.InlineCastExpr) FullyQualifiedInlineCastExpr(org.drools.mvel.parser.ast.expr.FullyQualifiedInlineCastExpr) FieldAccessExpr(com.github.javaparser.ast.expr.FieldAccessExpr) NullSafeFieldAccessExpr(org.drools.mvel.parser.ast.expr.NullSafeFieldAccessExpr) ArrayCreationExpr(com.github.javaparser.ast.expr.ArrayCreationExpr) ThisExpr(com.github.javaparser.ast.expr.ThisExpr) ListCreationLiteralExpression(org.drools.mvel.parser.ast.expr.ListCreationLiteralExpression) Optional(java.util.Optional) DrlNameExpr(org.drools.mvel.parser.ast.expr.DrlNameExpr) ArrayAccessExpr(com.github.javaparser.ast.expr.ArrayAccessExpr) BinaryExpr(com.github.javaparser.ast.expr.BinaryExpr) HalfBinaryExpr(org.drools.mvel.parser.ast.expr.HalfBinaryExpr) NullSafeFieldAccessExpr(org.drools.mvel.parser.ast.expr.NullSafeFieldAccessExpr) MapCreationLiteralExpression(org.drools.mvel.parser.ast.expr.MapCreationLiteralExpression) Type(com.github.javaparser.ast.type.Type) DrlxParseUtil.getExpressionType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getExpressionType) DrlxParseUtil.toClassOrInterfaceType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.toClassOrInterfaceType) ParameterizedType(java.lang.reflect.ParameterizedType) ClassOrInterfaceType(com.github.javaparser.ast.type.ClassOrInterfaceType) DrlxParseUtil.getClassFromType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getClassFromType) ReferenceType(com.github.javaparser.ast.type.ReferenceType) DrlxParseUtil.safeResolveType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.safeResolveType) MvelParser.parseType(org.drools.mvel.parser.MvelParser.parseType) ClassUtils.extractGenericType(org.drools.core.util.ClassUtils.extractGenericType) DrlxParseUtil.getLiteralExpressionType(org.drools.modelcompiler.builder.generator.DrlxParseUtil.getLiteralExpressionType) DeclarationSpec(org.drools.modelcompiler.builder.generator.DeclarationSpec) Expression(com.github.javaparser.ast.expr.Expression) UnificationTypedExpression(org.drools.modelcompiler.builder.generator.UnificationTypedExpression) MapCreationLiteralExpression(org.drools.mvel.parser.ast.expr.MapCreationLiteralExpression) DrlxParseUtil.isThisExpression(org.drools.modelcompiler.builder.generator.DrlxParseUtil.isThisExpression) ListCreationLiteralExpression(org.drools.mvel.parser.ast.expr.ListCreationLiteralExpression) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) ClassUtil.toRawClass(org.drools.modelcompiler.util.ClassUtil.toRawClass) EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr) MethodCallExpr(com.github.javaparser.ast.expr.MethodCallExpr) NullSafeMethodCallExpr(org.drools.mvel.parser.ast.expr.NullSafeMethodCallExpr) DrlxParseUtil.nameExprToMethodCallExpr(org.drools.modelcompiler.builder.generator.DrlxParseUtil.nameExprToMethodCallExpr)

Example 14 with EnclosedExpr

use of com.github.javaparser.ast.expr.EnclosedExpr in project drools by kiegroup.

the class AbstractExpressionBuilder method getBindingExpression.

protected Expression getBindingExpression(SingleDrlxParseSuccess drlxParseResult) {
    if (drlxParseResult.getExpr() instanceof EnclosedExpr && !drlxParseResult.isCombined() && !drlxParseResult.isPredicate()) {
        return buildConstraintExpression(drlxParseResult, ((EnclosedExpr) drlxParseResult.getExpr()).getInner());
    } else {
        final TypedExpression boundExpr = drlxParseResult.getBoundExpr();
        // Can we unify it? Sometimes expression is in the left sometimes in expression
        final Expression e = boundExpr != null ? findLeftmostExpression(boundExpr.getExpression()) : drlxParseResult.getExpr();
        return buildConstraintExpression(drlxParseResult, drlxParseResult.getUsedDeclarationsOnLeft(), e);
    }
}
Also used : DrlxParseUtil.isThisExpression(org.drools.modelcompiler.builder.generator.DrlxParseUtil.isThisExpression) Expression(com.github.javaparser.ast.expr.Expression) CoercedExpression(org.drools.modelcompiler.builder.generator.drlxparse.CoercedExpression) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression)

Example 15 with EnclosedExpr

use of com.github.javaparser.ast.expr.EnclosedExpr in project drools by kiegroup.

the class ConstraintParser method parseUnaryExpr.

private DrlxParseResult parseUnaryExpr(UnaryExpr unaryExpr, Class<?> patternType, String bindingId, ConstraintExpression constraint, Expression drlxExpr, boolean hasBind, boolean isPositional) {
    TypedExpressionResult typedExpressionResult = new ExpressionTyper(context, patternType, bindingId, isPositional).toTypedExpression(unaryExpr);
    Optional<TypedExpression> opt = typedExpressionResult.getTypedExpression();
    if (!opt.isPresent()) {
        return new DrlxParseFail(new ParseExpressionErrorResult(drlxExpr));
    }
    TypedExpression typedExpression = opt.get();
    SingleDrlxParseSuccess innerResult = (SingleDrlxParseSuccess) compileToJavaRecursive(patternType, bindingId, constraint, unaryExpr.getExpression(), hasBind, isPositional);
    Expression innerExpression;
    if (unaryExpr.getExpression() instanceof EnclosedExpr && !(innerResult.getExpr() instanceof EnclosedExpr)) {
        // inner EnclosedExpr could be stripped
        innerExpression = new EnclosedExpr(innerResult.getExpr());
    } else {
        innerExpression = innerResult.getExpr();
    }
    return new SingleDrlxParseSuccess(patternType, bindingId, new UnaryExpr(innerExpression, unaryExpr.getOperator()), typedExpression.getType()).setDecodeConstraintType(Index.ConstraintType.UNKNOWN).setUsedDeclarations(typedExpressionResult.getUsedDeclarations()).setReactOnProperties(typedExpressionResult.getReactOnProperties()).setLeft(new TypedExpression(innerResult.getExpr(), innerResult.getExprType())).setIsPredicate(innerResult.isPredicate());
}
Also used : Expression(com.github.javaparser.ast.expr.Expression) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) DrlxExpression(org.drools.mvel.parser.ast.expr.DrlxExpression) ExpressionTyper(org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper) ParseExpressionErrorResult(org.drools.modelcompiler.builder.errors.ParseExpressionErrorResult) DrlxParseUtil.stripEnclosedExpr(org.drools.modelcompiler.builder.generator.DrlxParseUtil.stripEnclosedExpr) EnclosedExpr(com.github.javaparser.ast.expr.EnclosedExpr) TypedExpressionResult(org.drools.modelcompiler.builder.generator.expressiontyper.TypedExpressionResult) TypedExpression(org.drools.modelcompiler.builder.generator.TypedExpression) UnaryExpr(com.github.javaparser.ast.expr.UnaryExpr)

Aggregations

EnclosedExpr (com.github.javaparser.ast.expr.EnclosedExpr)25 Expression (com.github.javaparser.ast.expr.Expression)22 BinaryExpr (com.github.javaparser.ast.expr.BinaryExpr)12 DrlxExpression (org.drools.mvel.parser.ast.expr.DrlxExpression)9 HalfBinaryExpr (org.drools.mvel.parser.ast.expr.HalfBinaryExpr)9 MethodCallExpr (com.github.javaparser.ast.expr.MethodCallExpr)8 TypedExpression (org.drools.modelcompiler.builder.generator.TypedExpression)8 CastExpr (com.github.javaparser.ast.expr.CastExpr)7 NameExpr (com.github.javaparser.ast.expr.NameExpr)7 DrlNameExpr (org.drools.mvel.parser.ast.expr.DrlNameExpr)7 Node (com.github.javaparser.ast.Node)6 FieldAccessExpr (com.github.javaparser.ast.expr.FieldAccessExpr)6 UnaryExpr (com.github.javaparser.ast.expr.UnaryExpr)6 ArrayList (java.util.ArrayList)6 DrlxParseUtil.stripEnclosedExpr (org.drools.modelcompiler.builder.generator.DrlxParseUtil.stripEnclosedExpr)6 ParseExpressionErrorResult (org.drools.modelcompiler.builder.errors.ParseExpressionErrorResult)5 SimpleName (com.github.javaparser.ast.expr.SimpleName)4 ThisExpr (com.github.javaparser.ast.expr.ThisExpr)4 Optional (java.util.Optional)4 DrlxParseUtil.toClassOrInterfaceType (org.drools.modelcompiler.builder.generator.DrlxParseUtil.toClassOrInterfaceType)4