/** * Creates a MethodCallExpression that represents a call to a * static method that has arguments, using varargs. */ public static MethodCallExpression call(Method method, Expression... arguments) { return new MethodCallExpression(method, null, toList(arguments)); }
public Expression field(Expression expression, int field, Type fromType, Type fieldType) { final MethodCallExpression e = Expressions.call(expression, BuiltInMethod.LIST_GET.method, Expressions.constant(field)); if (fromType == null) { fromType = e.getType(); } return RexToLixTranslator.convert(e, fromType, fieldType); } },
public Expression field(Expression expression, int field, Type fromType, Type fieldType) { final MethodCallExpression e = Expressions.call(expression, BuiltInMethod.LIST_GET.method, Expressions.constant(field)); if (fromType == null) { fromType = e.getType(); } return RexToLixTranslator.convert(e, fromType, fieldType); } },
/** * Creates a MethodCallExpression that represents a call to a * method that takes arguments. */ public static MethodCallExpression call(Expression expression, Method method, Iterable<? extends Expression> arguments) { return new MethodCallExpression(method, expression, toList(arguments)); }
/** * Creates a MethodCallExpression that represents a call to a * static method that has arguments. */ public static MethodCallExpression call(Method method, Iterable<? extends Expression> arguments) { return new MethodCallExpression(method, null, toList(arguments)); }
/** * Creates a MethodCallExpression that represents a call to a * method that takes arguments, using varargs. */ public static MethodCallExpression call(Expression expression, Method method, Expression... arguments) { return new MethodCallExpression(method, expression, toList(arguments)); }
/** * Creates a MethodCallExpression that represents a call to a * method that takes arguments, with an explicit return type. * * <p>The return type must be consistent with the return type of the method, * but may contain extra information, such as type parameters.</p> * * <p>The {@code expression} argument may be null if and only if the method * is static.</p> */ public static MethodCallExpression call(Type returnType, Expression expression, Method method, Iterable<? extends Expression> arguments) { return new MethodCallExpression(returnType, method, expression, toList(arguments)); }
/** * Creates a MethodCallExpression that represents a call to a * method that takes arguments, with an explicit return type, with varargs. * * <p>The return type must be consistent with the return type of the method, * but may contain extra information, such as type parameters.</p> * * <p>The {@code expression} argument may be null if and only if the method * is static.</p> */ public static MethodCallExpression call(Type returnType, Expression expression, Method method, Expression... arguments) { return new MethodCallExpression(returnType, method, expression, toList(arguments)); }
/** * Creates a MethodCallExpression that represents a call to a * static method by calling the * appropriate factory method. */ public static MethodCallExpression call(Type type, String methodName, Iterable<? extends Expression> arguments) { Method method = Types.lookupMethod(Types.toClass(type), methodName, Types.toClassArray(arguments)); return new MethodCallExpression(method, null, toList(arguments)); }