public function getMethodAnnotationsForMatchingTag($tag, $methodName = null) {
        if ($methodName) {
            return isset($this->methodAnnotations[$methodName][$tag]) ? $this->methodAnnotations[$methodName][$tag] : array();
        } else {
            $matchingAnnotations = array();
            foreach ($this->getMethodAnnotations() as $method => $methodAnnotations) {
                if (isset($methodAnnotations[$tag])) {
                    $matchingAnnotations[$method] = $methodAnnotations[$tag];
                }
            }

            return $matchingAnnotations;
        }
    }