获取类突变器方法
import java.lang.reflect.Method; public class Main{ /** nowjava.com - 时 代 Java **/ public static void main(String[] argv) throws Exception{ Class clazz = String.class; String propertyName = "nowjava.com"; Class params = String.class; System.out.println(getMutator(clazz,propertyName,params)); } public static final String[] MUTATOR_PREFIXES = new String[] { "set" }; public static Method getMutator(Class clazz, String propertyName, Class... params) { propertyName = StringHelper.capitalize(propertyName);/*NowJava.com - 时代Java*/ for (String prefix : MUTATOR_PREFIXES) { try { return clazz.getDeclaredMethod(prefix + propertyName,