Here you can find the source of getMethod(Class clazz, String methodName, Class[] classes)
private static Method getMethod(Class clazz, String methodName, Class[] classes)
//package com.java2s; /* $Id$/*from w w w . j a v a 2 s. c o m*/ ***************************************************************************** * Copyright (c) 2009 Contributors - see below * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * tfmorris ***************************************************************************** * * Some portions of this file was previously release using the BSD License: */ import java.lang.reflect.Method; public class Main { private static Method getMethod(Class clazz, String methodName, Class[] classes) { try { return clazz.getDeclaredMethod(methodName, classes); } catch (NoSuchMethodException e) { return null; } } }