private function reflect()
    {
        $tokens = token_get_all($this->reflectedFileContent);
        $namespace = null;
        $classLevel = 0;
        $level = 0;
        $res = $uses = array();
        while (list(, $token) = each($tokens)) {
            switch (is_array($token) ? $token[0] : $token) {
                case T_CLASS:
                case T_INTERFACE:
                case T_TRAIT:
                    if ($name = $this->fetch($tokens, array(T_STRING))) {
                        $classLevel = $level + 1;
                        if ($namespace !== null) {
                            $objectFQN = $namespace . '\\' . $name;
                        } else {
                            $objectFQN = $name;
                        }
                        $this->objects[] = new ReflectionClass($objectFQN);
                    }
                    break;
                case T_NAMESPACE:
                    $namespace = '\\' . ltrim($this->fetch($tokens, array(T_STRING, T_NS_SEPARATOR)), '\\');
                    $res[$namespace] = array();
                    $uses = array();
                    break;
                case T_USE:
                    if ($classLevel === 0) {
                        while ($name = $this->fetch($tokens, array(T_STRING, T_NS_SEPARATOR))) {
                            $name = '\\' . ltrim($name, '\\');
                            if ($this->fetch($tokens, array(T_AS))) {
                                $uses[$this->fetch($tokens, array(T_STRING))] = $name;
                            } else {
                                $uses[$name] = $name;
                            }
                            if (!$this->fetch($tokens, array(','))) {
                                break;
                            }
                        }
                        $res[$namespace] = $uses;
                    }
                    break;
                case T_CURLY_OPEN:
                case T_DOLLAR_OPEN_CURLY_BRACES:
                case '{':
                    $level++;
                    break;
                case '}':
                    if ($level === $classLevel) {
                        $classLevel = 0;
                    }
                    $level--;
                    break;
            }
        }

        $this->namespaces = array_keys($res);
        $this->uses = $res;
    }