设置方法
//来自 时 代 Java - nowjava.com //package com.nowjava; import java.lang.reflect.Method; public class Main { public static final int SET_START = "set".length(); public static boolean isSetter(Method method) { String name = method.getName(); boolean hasOneParam = method.getParameterTypes().length == 1; boolean startsWithGet = (name.length() > SET_START) && name.startsWith("set"); /* 来 自