获取方法参数名称字符串
//package com.nowjava; import java.lang.reflect.Method;/*from 时代Java - N o w J a v a . c o m*/ public class Main { public static String getArgumentNamesStr(Method method) { StringBuilder sb = new StringBuilder(); Class<?>[] parameters = method.getParameterTypes(); for (int i = 0; i < parameters.length; i++) { sb.append(parameters[i].getName()); if (i != parameters.length - 1) { sb.append(","); } } return sb.toString(); } public static String getArgumentNamesStr(Class<?>[] parameters) { StringBuilder sb = new StringBuilder();/*nowjava.com - 时代Java 提 供*/ for (int i = 0; i < parameters.length; i++) { sb.append(parameters[i].g