/** * Initializes and returns an array with annotation instances from the doc comment * found in the passed reflection method instance. * * @param \AppserverIo\Lang\Reflection\MethodInterface $reflectionMethod The reflection method to load the doc comment from * * @return array The array with the ReflectionAnnotation instances loaded from the passed reflection method * @see \AppserverIo\Lang\Reflection\ReflectionAnnotation::fromDocComment() */ public static function fromReflectionMethod(MethodInterface $reflectionMethod) { // load the reflection method data we need to initialize the annotations $aliases = $reflectionMethod->getAnnotationAliases(); $ignore = $reflectionMethod->getAnnotationsToIgnore(); $docComment = $reflectionMethod->toPhpReflectionMethod()->getDocComment(); // load and return the annotations found in the doc comment return ReflectionAnnotation::fromDocComment($docComment, $ignore, $aliases); }