private function doDetectByRoutes($className)
    {
        //If we have entry for a command class, we should always return it, as it is most specific.
        if (!empty($this->simpleRoutes[$className])) {
            return new ClassDetection($this->simpleRoutes[$className]);
        }
        //Now, we should check, if we have 'regexp' entry for class
        foreach ($this->regexpRoutes as $regexpRoute => $poolName) {
            if (preg_match($regexpRoute, $className)) {
                return new ClassDetection($poolName);
            }
        }
    }