I need to fetch the parameter details of the calling method in the called method at runtime. I cannot directly pass the parameter names. I was wondering if there is any way to achieve this. I have something like this:
public class ABC {
public void methodOuter(String abc, int xyz) {
methodInner(); // In this method I need to fetch the methodOuter parameter list details.
}
}
class XYZ {
public void methodInner() {
// Here I need to fetch methodOuter parameter list, i.e I need to get the parameter name 'abc' and its value and parameter name 'xyz' and its value.
}
}
Any help is appreciated.
Aucun commentaire:
Enregistrer un commentaire