是吸气剂法
//package com.nowjava; /* n o w j a v a . c o m 提供 */ import java.lang.reflect.Method; public class Main { public static final int SET_START = "set".length(); public static final int IS_START = "is".length(); public static boolean isGetter(Method method) { String name = method.getName();/*nowjava.com - 时代Java 提 供*/ boolean hasNoParam = method.getParameterTypes().length == 0; boolean startsWithGet = (name.length() > SET_START) && name.startsWith("get"); boolean startsWithIs = (name.le