How to get a <SomeObject> combo method as a parameter using Reflection
I have
public void setContacts(List<PersonContact> contacts) {
this.contacts = contacts;
}
I need this method using Reflection, I tried
clazz.getMethod("setContacts", ArrayList.class);
show erro:
java.lang.NoSuchMethodException: model.person.Person.setContacts(java.util.ArrayList)
Right, method signature
setContacts(List<PersonContact> contacts)
So how can I pass the correct signature to getMethod?
+3