code: public Method findMethod(Class<?> type)	throws ReflectiveOperationException {
  		Method match = null;
  		for (Method option : type.getDeclaredMethods()) {
  			if (! getFunction().equals(option.getName())) continue;
  			Class<?>[] parameters = option.getParameterTypes();
  			if (parameters.length != getArguments().length) continue;
  			if (match != null) {
  				if (refines(option, match)) continue;
  				if (! refines(match, option))
  					throw ambiguity(match, option);
  			}
  			match = option;
  		}
  
  		Class<?>[] parents = { type.getSuperclass() };
  		if (type.isInterface())
  			parents = type.getInterfaces();
  		for (Class<?> parent : parents) {
  			if (parent == null) continue;
  			try {
  				Method superMatch = findMethod(parent);
  				if (match == null) {
  					match = superMatch;
  					continue;
  				}
  				if (! refines(superMatch, match))
  					throw ambiguity(match, superMatch);
  			} catch (NoSuchMethodException ignored) {
  			}
  		}
  
  		if (match == null) {
  			String fmt = "No method %s#%s with %d parameters";
  			String msg = format(fmt, type, getFunction(), getArguments().length);
  			throw new NoSuchMethodException(msg);
  		}
  
  		match.setAccessible(true);
  		return match;
  	}
docs: Gets a method match.