Community
Participate
Working Groups
Consider the following code: --------------------------------------------- public class Test { void method() { varargs("a", 1, 2, 3); } void varargs(String x, Object... objects) { } } --------------------------------------------- In method "method()", the argument list "1, 2, 3" is really an Object[] array. When selecting "1, 2, 3", I would like to be able to assign that array to a local variable, field, etc., just like any other argument. The result would be something like: --------------------------------------------- public class Test { void method() { Object[] objects = { 1, 2, 3 }; varargs("a", objects); } void varargs(String x, Object... objects) { } } ---------------------------------------------
Sounds good. The array type should be readily available in the MethodInvocation's method binding (necessary in case the vararg type refers to a type variable).