docs: private static List<Method> getMethodsList(final Class cls, final boolean declared) {
  		$.checkNotNull(cls);
  
  		final List<Method> allMethods = new ArrayList<Method>();
  		Class currentClass = cls;
  		while (currentClass != null) {
  			final Method[] methods = declared ? currentClass.getDeclaredMethods() : currentClass.getMethods();
  			for (Method method : methods) {
  				allMethods.add(method);
  			}
  			currentClass = currentClass.getSuperclass();
  		}
  		return allMethods;
  	}