public function addRoute($httpMethod, $route, $handler, array $middleware = [])
    {
        if (!$handler instanceof HandlerContainer) {
            $handler = new HandlerContainer($handler, array_merge($this->middlewareStack, $middleware));
        } else {
            $handler->addMiddleware(array_merge($this->middlewareStack, $middleware));
        }
        
        $handler = serialize($handler);
        
        $route = $this->currentGroupPrefix . $route;
        $routeDatas = $this->routeParser->parse($route);
        foreach ((array) $httpMethod as $method) {
            foreach ($routeDatas as $routeData) {
                $this->dataGenerator->addRoute($method, $routeData, $handler);
            }
        }
    }