Here you can find the source of getGetterFromProperty(Class clazz, String property)
public static Method getGetterFromProperty(Class clazz, String property) throws NoSuchMethodException
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static Method getGetterFromProperty(Class clazz, String property) throws NoSuchMethodException { char[] chars = property.toCharArray(); chars[0] = Character.toUpperCase(chars[0]); return clazz.getMethod("get" + new String(chars)); }// w w w . j a v a 2 s . c o m }