protected function buildClassLikeReflection(AbstractNode $node)
 {
     if ($node instanceof InterfaceNode) {
         $class = new ReflectionInterface((string) $node->namespacedName);
     } elseif ($node instanceof TraitNode) {
         $class = new ReflectionTrait((string) $node->namespacedName);
     } else {
         $class = new ReflectionClass((string) $node->namespacedName);
     }
     $class->setFilename((string) $this->context->getFilePath());
     $class->setStartLine((int) $node->getAttribute('startLine'));
     $class->setEndLine((int) $node->getAttribute('endLine'));
     $class->setAliases($this->context->getAliases());
     $class->setDocComment((string) $node->getDocComment());
     $this->context->enterReflection($class);
     return $class;
 }