Here you can find the source of getMethod(final Class
public static <T> Method getMethod(final Class<T> receiver, final String methodName, final Class<?>... parameterTypes)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; public class Main { public static <T> Method getMethod(final Class<T> receiver, final String methodName, final Class<?>... parameterTypes) { try {//w w w .j a v a2s. c o m return receiver.getMethod(methodName, parameterTypes); } catch (NoSuchMethodException | SecurityException e) { throw new RuntimeException(e); } } }