Here you can find the source of getMethod(Class objectClass, String methodName, String argumentType)
public static Method getMethod(Class objectClass, String methodName, String argumentType)
//package com.java2s; /*L//from w w w . j av a 2 s . c om * Copyright Oracle Inc, SAIC-F. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cadsr-bulk-loader/LICENSE.txt for details. */ import java.lang.reflect.Method; public class Main { public static Method getMethod(Class objectClass, String methodName, String argumentType) { Method returnMethod = null; Method[] methods = objectClass.getMethods(); int size = methods.length; for (int i = 0; i < size; i++) { Method method = methods[i]; if (method.getName().equals(methodName)) { Class[] args = method.getParameterTypes(); int argsize = args.length; if (argsize == 1) { Class arg = args[0]; if (arg.getName().equals(argumentType)) { returnMethod = method; break; } } } } return returnMethod; } }