protected BoundMethod match(PathPattern<Method> pattern, PathInput input, Object self) {
        Method method = pattern.getTarget();
        if (method != null) {
            input.bind(method);
            pattern.match(input);

            return new BoundMethod(self, method, input.getParameters());
        } else {
            return null;
        }
    }