Here you can find the source of getMethod(String name, Method method)
public static String getMethod(String name, Method method)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static String getMethod(String name, Method method) { if (method.getParameterTypes().length == 1 && method.getParameterTypes()[0] == boolean.class) { if (name.length() > 1) { return "is" + Character.toUpperCase(name.charAt(0)) + name.substring(1); } else { return "is" + Character.toUpperCase(name.charAt(0)); }/*from ww w . j a v a 2 s . com*/ } if (name.length() > 1) { return "get" + Character.toUpperCase(name.charAt(0)) + name.substring(1); } else { return "get" + Character.toUpperCase(name.charAt(0)); } } }