Get annotation for class and/or given method

@param string $name annotation name
@param string|null $method
@param mixed $default
@throws \ReflectionException
@return mixed
497978
public function getAnnotation($name, $method = null, $default = false)
    {
        $value = $this->getClassAnnotation($name, $default);

        if ($method !== null) {
            $value = $this->getMethodAnnotation($method, $name, $value);
        }

        return $value;
    }
75957
public function getParameterType(
        ReflectionMethod $method,
        string $parameterName,
        ? string $default = null
    ) : ? string {
        $parameters = $method->getParameters();

        foreach ($parameters as $parameter) {
            if ($parameter->getName() === $parameterName) {
                $class = $parameter->getClass();

                return $class
                    ? $class->getName()
                    : $default;
            }
        }

        return $default;
    }
793755
public AnnotationDescr getAnnotation( String name ) {
        return annotations == null ? null : annotations.get( name );
    }
810977
public function & getMethod( $name )
	{
		if( isset( $this->methods[$name] ) )
			return $this->methods[$name];
		throw new RuntimeException( "Method '$name' is unknown" );
	}
32390
public function getAnnotation($name)
    {
        return $this->annotations
            ->map(
                function (ArrayMap $value) use ($name) {
                    return $value->lookup($name);
                }
            )
            ->filter(
                function (Maybe $value) {
                    return $value->isJust();
                }
            )
            ->map(
                function (Maybe $value) {
                    return Maybe::fromJust($value);
                }
            );
    }
73768
private function collectMethodCacheAnnotations(ReflectionMethod $method)
    {
        $annotations = array_filter($this->annotationsReader->getMethodAnnotations($method), function ($annotation) {
            return $annotation instanceof CacheAnnotation;
        });

        return new AnnotationCollection($annotations);
    }
616617
private function get(string $name){
		$method = 'magic_get_'.$name;

		return \method_exists($this, $method) ? $this->$method() : null;
	}
555303
public function getAnnotation($name)
    {
        $result = null;

        if ($this->hasAnnotationAndReturn($name))
        {
            if (!string_ends_with($name, 'Annotation')) $name .= 'Annotation';

            $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;

            if ($result == null)
            {
                if (string_starts_with($name, '\\'))
                    $name = substr($name, 1, strlen($name) - 1);
                else
                    $name = '\\' . $name;

                $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;
            }

            $result = $this->evaluateAnnotation($result);
        }

        return $result;
    }
456895
public function getAttribute($name, $default = null)
    {
        $value = $this->reader->getAttribute($name);

        return null !== $value ? $value : $default;
    }
906453
public function getAnnotation($name, $methodName = NULL, $nullable = TRUE)
	{
		return Annotations::getAnnotation($name, $this, $methodName, $nullable);
	}
623036
public function getMethod($name)
    {
        return (isset($this->_methods[$name])) ? $this->_methods[$name] : null;
    }
691345
function getMethod($name) {
    if (isset($this->methods[$name])) {
      return $this->methods[$name];
    }
    if ($this->methodsComplete) {
      return NULL;
    }
    if (array_key_exists($name, $this->methodsNotFound)) {
      return NULL;
    }
    $methodObj = $this->findMethod($name);
    if (NULL === $methodObj) {
      $this->methodsNotFound[$name] = TRUE;
      return NULL;
    }
    $this->methods[$name] = $methodObj;
    return $methodObj;
  }
927121
public function getName($name = null, $domain = null, $method = '*')
    {
        return Zilf::$container->getShare('ruleName')->get($name, $domain, $method);
    }
60414
public function getMethod($name)
    {
        if ($this->reflected->hasMethod($name))
            return $this->annotations['methods'][$name];

        return null;
    }
703696
public function getParameter($name, $default = null)
    {
        try {
            return ArrayHelper::get($this->getParameters(), $name, $default);
        } catch (Exception $ex) {
            return $default;
        }
    }
119107
public function getParameter($name, $default = null)
    {
        if (!$this->getContainer()->hasParameter($name)) {
            return $default;
        }

        return $this->getContainer()->getParameter($name);
    }
1164570
private function _get($name, $default = null)
    {
        return array_key_exists($name, $this->getData()) ? $this->getData()[$name] : $default;
    }