public function parse($range = self::RANGE_EVERYTHING)
    {
        // check if all requirements are fulfilled
        if (!$this->requirementsFulfilled()) {
            throw new Doozr_Di_Exception(
                'Error parsing annotations. Requirements not fulfilled. Please set input to parse annotations from.'
            );
        }

        // prepare input
        $input = $this->getInput();

        // check if class is already in scope
        if (!class_exists($input['className'])) {
            if (!isset($input['file'])) {
                throw new Doozr_Di_Exception(
                    'Error parsing dependencies from className. Class not found in scope and no "file" defined!'
                );
            }

            $this->loadFile($input['file']);
        }

        // create a reflection instance of the className
        $reflection = new ReflectionClass($input['className']);

        // parse annotation(s) from reflection and return result
        $this->lastResult = $this->parseFromReflectionByRange($reflection, $range);

        return $this->lastResult;
    }