Here you can find the source of getMethod(Class> clazz, String methodName, Class>... parameterTypes)
private static Method getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes)
//package com.java2s; /*//from w ww . j a v a 2 s . c o m * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (http://h2database.com/html/license.html). * Initial Developer: H2 Group * Iso8601: Initial Developer: Philippe Marschall (firstName dot lastName * at gmail dot com) */ import java.lang.reflect.Method; import java.util.Arrays; public class Main { private static Method getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) { try { return clazz.getMethod(methodName, parameterTypes); } catch (NoSuchMethodException e) { throw new IllegalStateException("Java 8 or later but method " + clazz.getName() + "#" + methodName + "(" + Arrays.toString(parameterTypes) + ") is missing", e); } } }