Here you can find the source of getGetter(final Class> clz, final String propertyName)
public static Method getGetter(final Class<?> clz, final String propertyName) throws NoSuchMethodException
//package com.java2s; import java.lang.reflect.Method; public class Main { public static Method getGetter(final Class<?> clz, final String propertyName) throws NoSuchMethodException { final Class<?> getterArgs[] = new Class<?>[0]; final String getterName = "get" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); return clz.getMethod(getterName, getterArgs); }//from w w w . j ava 2s .co m }