Ejemplo n.º 1
0
 /**
  * Initializes the result configuration instance from the passed reflection annotation instance.
  *
  * @param \AppserverIo\Lang\Reflection\AnnotationInterface $reflectionAnnotation The reflection annotation with the result configuration
  *
  * @return \AppserverIo\Routlt\Description\ResultDescriptorInterface The initialized descriptor
  */
 public function fromReflectionAnnotation(AnnotationInterface $reflectionAnnotation)
 {
     // initialize the annotation instance
     $annotationInstance = $reflectionAnnotation->newInstance($reflectionAnnotation->getAnnotationName(), $reflectionAnnotation->getValues());
     // initialize the descriptor properties from the annotation values
     $this->setName($annotationInstance->getName());
     $this->setType($annotationInstance->getType());
     $this->setResult($annotationInstance->getResult());
     // return the instance
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Creates a new new instance of the annotation type, defined in the passed reflection annotation.
  *
  * @param \AppserverIo\Lang\Reflection\AnnotationInterface $annotation The reflection annotation we want to create the instance for
  *
  * @return \AppserverIo\Lang\Reflection\AnnotationInterface The real annotation instance
  */
 public function newAnnotationInstance(AnnotationInterface $annotation)
 {
     return $annotation->newInstance($annotation->getAnnotationName(), $annotation->getValues());
 }