Java tutorial
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; import java.util.List; public class Main { @SuppressWarnings("rawtypes") private static List<Method> getParentClassMothds(List<Method> list, Class clazz) { Method[] methods = clazz.getDeclaredMethods(); for (Method method : methods) { list.add(method); } if (clazz.getSuperclass() == Object.class) { return list; } getParentClassMothds(list, clazz.getSuperclass()); return list; } }