private static List<Expression> simpleList(BlockExpression expression) { Expression simple = Blocks.simple(expression); if (simple instanceof NewExpression) { NewExpression newExpression = (NewExpression) simple; return newExpression.arguments; } else { return Collections.singletonList(simple); } }
public RexNode toRex(BlockExpression expression) { return toRex(Blocks.simple(expression)); }