Here you can find the source of getMethodUp(Class> type, String name, Class>... parameterTypes)
static public Method getMethodUp(Class<?> type, String name, Class<?>... parameterTypes)
//package com.java2s; import java.lang.reflect.Method; public class Main { static public Method getMethodUp(Class<?> type, String name, Class<?>... parameterTypes) { // super class Method method = null;/*from ww w.java 2 s .com*/ for (Class<?> clazz = type; clazz != Object.class; clazz = clazz.getSuperclass()) { try { method = clazz.getDeclaredMethod(name, parameterTypes); break; } catch (Exception e) { // ignore } } return method; } }