Here you can find the source of getMethod(String name, Class> pojoClass)
public static Method getMethod(String name, Class<?> pojoClass) throws Exception
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static String GET = "get"; public static String SET = "set"; public static Method getMethod(String name, Class<?> pojoClass) throws Exception { StringBuffer getMethodName = new StringBuffer(GET); getMethodName.append(name.substring(0, 1).toUpperCase()); getMethodName.append(name.substring(1)); return pojoClass.getMethod(getMethodName.toString(), new Class[] {}); }// w w w.j a v a 2 s . c o m public static Method getMethod(String name, Class<?> pojoClass, Class<?> type) throws Exception { StringBuffer getMethodName = new StringBuffer(SET); getMethodName.append(name.substring(0, 1).toUpperCase()); getMethodName.append(name.substring(1)); return pojoClass.getMethod(getMethodName.toString(), new Class[] { type }); } }