code: public static List<Method> methodsOf(Class<?> type) {
          if (type == null) {
              throw new IllegalArgumentException("Method argument type must not be null");
          }
          List<Method> methods = new LinkedList<>();
          Queue<Class<?>> classes = new LinkedList<>();
          classes.add(type);
          while (!classes.isEmpty()) {
              Class<?> c = classes.poll();
              methods.addAll(asList(c.getDeclaredMethods()));
              if (c.getSuperclass() != null) {
                  classes.add(c.getSuperclass());
              }
              addAll(classes, c.getInterfaces());
          }
          return methods;
      }
docs: All methods of the given type, its super types and interfaces, starting with the methods of
  the given type.
  
  @param type must not be <code>null</code>.
  @return never <code>null</code> but rather an empty list.