/**
  * Processes the parent reflection object.
  *
  * @param \TokenReflection\IReflection       $parent      Parent reflection object
  * @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
  *
  * @return \TokenReflection\ReflectionElement
  * @throws \TokenReflection\Exception\ParseException If an invalid parent reflection object was provided.
  */
 protected function processParent(IReflection $parent, Stream $tokenStream)
 {
     if (!$parent instanceof ReflectionClass) {
         throw new Exception\ParseException($this, $tokenStream, 'The parent object has to be an instance of TokenReflection\\ReflectionClass.', Exception\ParseException::INVALID_PARENT);
     }
     $this->declaringClassName = $parent->getName();
     if ($parent->isTrait()) {
         $this->declaringTraitName = $parent->getName();
     }
     return parent::processParent($parent, $tokenStream);
 }
 /**
  * Processes the parent reflection object.
  *
  * @param \TokenReflection\IReflection       $parent      Parent reflection object
  * @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
  *
  * @return \TokenReflection\ReflectionElement
  * @throws \TokenReflection\Exception\ParseException If an invalid parent reflection object was provided.
  */
 protected function processParent(IReflection $parent, Stream $tokenStream)
 {
     if (!$parent instanceof ReflectionFileNamespace) {
         throw new Exception\ParseException($this, $tokenStream, 'The parent object has to be an instance of TokenReflection\\ReflectionFileNamespace.', Exception\ParseException::INVALID_PARENT);
     }
     $this->namespaceName = $parent->getName();
     $this->aliases = $parent->getNamespaceAliases();
     return parent::processParent($parent, $tokenStream);
 }