I am trying to use a constructor for a class with reflection by doing:
<Class>.getConstructor(String.class, Array.newInstance(Car.class).getClass())
when the constructor for the class looks like this:
public <Class>(String var1, Car... var2)
But when the code I try to run that code (and create a new instance of the class) an IllegalArgumentException is thrown.
Aucun commentaire:
Enregistrer un commentaire