Here you can find the source of getMethod(String className, String functionName, Class[] paramTypes)
public static Method getMethod(String className, String functionName, Class[] paramTypes) throws ClassNotFoundException, SecurityException, NoSuchMethodException
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; public class Main { public static Method getMethod(String className, String functionName, Class[] paramTypes) throws ClassNotFoundException, SecurityException, NoSuchMethodException { Method method = null;//from www . j a va 2 s.co m Class actionClassObj; actionClassObj = Class.forName(className); method = actionClassObj.getMethod(functionName, paramTypes); return method; } public static Method getMethod(String className, String functionName, Class[] paramTypes, ClassLoader customClassLoader) throws ClassNotFoundException, SecurityException, NoSuchMethodException { Method method = null; Class actionClassObj; actionClassObj = Class.forName(className, false, customClassLoader); method = actionClassObj.getMethod(functionName, paramTypes); return method; } }