从方法获取参数名称
//package com.nowjava; import java.lang.reflect.Method; /** nowjava.com 提 供 **/ 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(); } return rets; } }