Guess you have a class with some c-tors:
public Foo(int i, String s);
public Foo(float fl, String s);
public Foo(String s, Bar b, boolean f);
Now, when you have the following fn:
public Foo doSomething(Object… args)
{
/*… do something before … */
Foo foo = new Foo( ?!? );
/*… do something after … */
return foo;
}
What should one to to call the correct c-tor? Is there a way to translate args back into the …-form?
You can, of course check the number and type of the arguments and dispatch accordingly. But note my comment above.