I using the following code to get the method input parameter but I getting the wrong params for example I for set salary I want to get the type (double )and the name (salary) . what i miss here ?
public void setSalery(double salery) {
this.salery = salery;
}
this is the code
for (Method method : classHandle.getMethods()) {
Class<?>[] parameterTypes = method.getParameterTypes();
for (Class<?> class1 : parameterTypes) {
Field[] declaredFields = class1.getDeclaredFields();
for (Field field : declaredFields) {
System.out.println(field.getName());
}