Here you can find the source of getMethod(String classFullName, String methodName, Class>... parameterTypes)
public static Method getMethod(String classFullName, String methodName, Class<?>... parameterTypes)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static Method getMethod(String classFullName, String methodName, Class<?>... parameterTypes) { Class<?> cls = getClass(classFullName); if (cls == null || "".equals(methodName)) { return null; }/*from w w w . ja v a 2s. c om*/ Method method = null; try { method = cls.getDeclaredMethod(methodName, parameterTypes); } catch (SecurityException | NoSuchMethodException e) { System.out.println(e.getMessage()); } return method; } private static Class<?> getClass(String classFullName) { Class<?> cls = null; try { cls = Class.forName(classFullName); } catch (ClassNotFoundException e) { System.out.println(e.getMessage()); } return cls; } }