public class Test {
private static void aMethod(String a, int i) {
printParam();
}
private static void aMethod(String a) {
printParam();
}
private static void printParam() {
//System.out.println(gson.toJson(MethodInvocation.getArguments()));
}
}
Is there a way, like MethodInvocation.getArguments(), to print out the method parameters' value without considering the count and type of the parameters?
Addition: I think it's not a question about "varags". The method's parameters have beed designed already and I just want to print the parameters.