protected function getAnnotations($refPoint)
{
switch (true) {
case $refPoint instanceof \ReflectionClass:
return $this->annotationReader->getClassAnnotations($refPoint);
case $refPoint instanceof \ReflectionMethod:
return $this->annotationReader->getMethodAnnotations($refPoint);
case $refPoint instanceof \ReflectionProperty:
return $this->annotationReader->getPropertyAnnotations($refPoint);
default:
throw new \InvalidArgumentException("Unsupported reflection point " . get_class($refPoint));
}
}