Here you can find the source of getMethod(String methodName, Class> clazz, Class>... args)
private static Method getMethod(String methodName, Class<?> clazz, Class<?>... args)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { private static Method getMethod(String methodName, Class<?> clazz, Class<?>... args) { Method method;//from w w w. j a v a 2 s.co m try { method = clazz.getMethod(methodName, args); } catch (NoSuchMethodException e1) { method = null; } return method; } }