Here you can find the source of getMethod(Class> klass, String methodName)
public static Method getMethod(Class<?> klass, String methodName)
//package com.java2s; import java.lang.reflect.Method; public class Main { public static Method getMethod(Class<?> klass, String methodName) { try {// ww w . java 2 s. c o m return klass.getMethod(methodName); } catch (Exception e) { throw new RuntimeException(e); } } }