Java examples for Reflection:Method Name
get Argument Names from Method
//package com.java2s; import java.lang.reflect.Method; public class Main { public static String[] getArgumentNames(Method method) { String[] rets = new String[] {}; Class<?>[] parameters = method.getParameterTypes(); for (int i = 0; i < parameters.length; i++) { rets[i] = parameters[i].getName(); }/*www. j a v a 2s .c om*/ return rets; } }