Search in sources :

Example 1 with ObjectCreationExpressionT

use of org.drools.mvelcompiler.ast.ObjectCreationExpressionT in project drools by kiegroup.

the class RHSPhase method visit.

@Override
public TypedExpression visit(ObjectCreationExpr n, Context arg) {
    List<TypedExpression> constructorArguments = new ArrayList<>();
    for (Expression e : n.getArguments()) {
        TypedExpression compiledArgument = e.accept(this, arg);
        constructorArguments.add(compiledArgument);
    }
    return new ObjectCreationExpressionT(constructorArguments, resolveType(n.getType()));
}
Also used : UnalteredTypedExpression(org.drools.mvelcompiler.ast.UnalteredTypedExpression) Expression(com.github.javaparser.ast.expr.Expression) TypedExpression(org.drools.mvelcompiler.ast.TypedExpression) ObjectCreationExpressionT(org.drools.mvelcompiler.ast.ObjectCreationExpressionT) ArrayList(java.util.ArrayList) UnalteredTypedExpression(org.drools.mvelcompiler.ast.UnalteredTypedExpression) TypedExpression(org.drools.mvelcompiler.ast.TypedExpression)

Aggregations

Expression (com.github.javaparser.ast.expr.Expression)1 ArrayList (java.util.ArrayList)1 ObjectCreationExpressionT (org.drools.mvelcompiler.ast.ObjectCreationExpressionT)1 TypedExpression (org.drools.mvelcompiler.ast.TypedExpression)1 UnalteredTypedExpression (org.drools.mvelcompiler.ast.UnalteredTypedExpression)1