I am trying to get a method of a class I load during runtime using Class.getDeclaredMethod
. The parameters for Class.getDeclaredMethod
are String name, Class<?>... parameterTypes
. I have the parameterTypes
as a List.
How do I pass the parameterTypes
from my list to the Class.getDeclaredMethod
?
I tried (Class[]) paramterTypes.toArray()
and it didn't work.
Aucun commentaire:
Enregistrer un commentaire