protected function _parseName($name)
    {
        $result = [];
        $parts = preg_split('~([^\\\]*\\\?)~', $name, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

        $last = array_pop($parts);

        if (!$last) {
            return [];
        }

        foreach ($parts as $name) {
            $result[] = [$name, 'namespace'];
        }

        if (strpos($last, '::') !== false) {
            list($name, $subname) = explode('::', $last, 2);
            $result[] = [$name, 'class'];
            $result[] = [$subname, 'method'];
        } elseif (preg_match('~\(\)$~', $last)) {
            $result[] = [$last, 'function'];
        } else {
            $result[] = [$last, substr($last, -1) === '\\' ? 'namespace' : 'class'];
        }
        return $result;
    }