List<Method> (Class<?> clazz) { ArrayList<Method> list = new ArrayList<>(); for (Class<?> cl = clazz; cl != null; cl = cl.getSuperclass()) { list.addAll(Arrays.asList(cl.getDeclaredMethods())); } return list; }