Here you can find the source of getMethod(Class> c, String name)
public static java.lang.reflect.Method getMethod(Class<?> c, String name)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.lang.reflect.Method; public class Main { public static java.lang.reflect.Method getMethod(Class<?> c, String name) { Method _method = null;//from ww w. ja va2s . co m for (Method m : c.getMethods()) { if (m.getName().equalsIgnoreCase(name)) { _method = m; break; } } return _method; } }