lundi 25 mai 2020

Method parameter is Array of Enum, using reflection how to get the method

I have:

 enum E {A,b}

Now a class and method having var args of type E:

public class D{
 public void do(E ..arg){}
}

Class z = Class.forName("D");
Class e = Class.forName("E");
Method m = z.getDeclaredMethod("do",e);

giving me error java.lang.NoSuchMethodException





Aucun commentaire:

Enregistrer un commentaire