@Override
  public void visitConstructorCallExpression(ConstructorCallExpression expr) {
    ConstructorCallExpression result = new ConstructorCallExpression(
        expr.getType(),
        replaceExpr(expr.getArguments()));
    result.setSourcePosition(expr);
    result.setUsingAnonymousInnerClass(expr.isUsingAnonymousInnerClass());
    replaceVisitedExpressionWith(result);
  }
Groovy AST visitor that allows to replace both statements and expressions.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/compiler/ExpressionReplacingVisitorSupport.java