Here you can find the source of getMethod(Object oo, String mname)
public static Method getMethod(Object oo, String mname)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static final String METHOD_PRIFIX = "set"; public static Method getMethod(Object oo, String mname) { try {//from www .j a v a 2 s.c om Method method = oo.getClass().getMethod(toMethodName(mname), new Class[] { String.class }); return method; } catch (Exception ex) { return null; } } public static String toMethodName(String mname) { return METHOD_PRIFIX + mname.substring(0, 1).toUpperCase() + mname.substring(1); } }