parameters - difference of variadic argumets and array definition for reflection -


I have the following two pieces of code:

  public class C {public zero method 1 (string [] args) {} public zero method 2 (string ... args) {}}   

Then I get the example examples of the above methods above reflections.

  method m1 = zero; Method m2 = zero; Class C = Classroom ForName ("C"); (Method m: c.getMethods ()) {if (m.getName (.) Equals ("method1")) m1 = m; If (m.getName (.) Equals ("method2")) m2 = m; }   

m1.getParameters () and m2.getParameters () return class equals the list of examples. Logic of M1 and logic of M2 are both represented as arrays, but in reality they are not equal, the compiler will not allow

  m1 ("a", "b");   

The question is:

Is there any flag that specifies whether the parameter variation or just the regular array?

class java.lang.reflect.Method method is VirArg (). It shows that the last logic difference of the method is different.

Comments