Get the annotation reader that is used.
Initializes it if it doesn't already exists.

@return Reader The annotation reader.
552002
public static function getAnnotationReader()
    {
        if (self::$annotationReader === null) {
            self::$annotationReader = new CachedReader(new AnnotationReader(), new ArrayCache());
        }

        return self::$annotationReader;
    }
44653
protected function constructReadMethod()
    {
        // Reader methods ends with this.
        $endsWith = 'annotations';

        // We have an annotation name which means
        // we have to target a specific one.
        if ($this->wantsSpecificAnnotation()) {
            $endsWith = 'annotation';
        }

        return Str::camel('get'.$this->target.$endsWith);
    }
1013521
public static BufferedReader getReader(Reader reader) {
		if (null == reader) {
			return null;
		}

		return (reader instanceof BufferedReader) ? (BufferedReader) reader : new BufferedReader(reader);
	}
1099571
private function initAnnotationReader()
    {
        AnnotationRegistry::registerFile(
            $this->getVendorDir().'/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'
        );

        // annotations require custom autoloading
        AnnotationRegistry::registerAutoloadNamespaces([
            'JMS\Serializer\Annotation' => $this->getVendorDir().'/jms/serializer/src/',
        ]);

        AnnotationRegistry::registerLoader(function ($classname) {
            if (0 === strpos($classname, 'BackBee')) {
                return class_exists($classname);
            }

            if (0 === strpos($classname, 'Symfony\Component\Validator\Constraints')) {
                return class_exists($classname);
            }

            return false;
        });
    }
1175451
public static function getInstance()
    {
        $driver = static::getLibrary();

        try {
            $instance = self::factory($driver, AnnotationsInterface::class);
        } catch (\Exception $e) {
            throw new AnnotationsException($e->getMessage());
        }

        return $instance;
    }
1342614
public static function getConstraintsValidator()
    {
        if (self::$constraintsValidator === null) {
            self::$constraintsValidator = Validation::createValidatorBuilder()
                ->enableAnnotationMapping(self::getAnnotationReader())
                ->getValidator();
        }

        return self::$constraintsValidator;
    }
856999
public static AnnotationMappingInfo load(final Reader reader) throws XmlOperateException {
        ArgUtils.notNull(reader, "reader");
        
        final AnnotationMappingInfo xmlInfo;
        
        try {
            xmlInfo = JAXB.unmarshal(reader, AnnotationMappingInfo.class);
        } catch (DataBindingException e) {
            throw new XmlOperateException("fail load xml with JAXB.", e);
        }
        
        return xmlInfo;
    }
1374359
@Override
    protected RDBMSEntityReader getReader()
    {
        if (reader == null)
        {
            reader = new RDBMSEntityReader(getJPAQuery(), kunderaQuery, kunderaMetadata);
        }
        return reader;
    }
81279
public Reader asReader() {
        Reader r = getReader();
        if (r != null) return r;
        String s = getString();
        if (s != null) return new StringReader(s);
        InputStream is = fromStreamOrBufferOrUrl();
        if (is != null) return readerFrom(is);
        throw resourceUnaccessible();
    }
185991
public  synchronized AnnotationHelper getAnnotationHelper () {

        if (aHelper == null) {
            this.aHelper = new AnnotationHelper(wApp);    
    
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {
                logger.logp (Level.FINE, CLASS_NAME, "getAnnotationHelper",
                     "created new annotation helper instance --> [" + this.aHelper + "]");
            }
        }
        
        return aHelper;
    }
1070203
protected function getConfigurationReader()
    {
        // Add required dependencies
        self::$registry->getContainer()->getMap()->wire(
            [
                'doozr.filesystem.service' => Doozr_Loader_Serviceloader::load('filesystem'),
                'doozr.cache.service'      => Doozr_Loader_Serviceloader::load(
                    'cache',
                    DOOZR_CACHING_CONTAINER,
                    DOOZR_NAMESPACE_FLAT.'.cache.i18n',
                    [],
                    DOOZR_UNIX,
                    DOOZR_CACHING
                ),
            ]
        );

        /* @var Doozr_Configuration_Reader_Ini $config */
        $config = self::$registry->getContainer()->build(
            'doozr.configuration.reader.ini',
            [
                DOOZR_CACHING,
            ]
        );

        return $config;
    }
1343069
@SuppressWarnings("unchecked")
    @NotNull
    public final Parser<Object> getParser() {
        if (parser != null) {
            return parser;
        }
        LOG.info("Creating parser: {}", className);
        if (className == null) {
            throw new IllegalStateException("Class name was not set: " + getName());
        }
        if (context == null) {
            throw new IllegalStateException("Context class loader was not set: " + getName() + " / " + className);
        }
        final Object obj = Utils4J.createInstance(className, context.getClassLoader());
        if (!(obj instanceof Parser<?>)) {
            throw new IllegalStateException("Expected class to be of type '" + Parser.class.getName() + "', but was: " + className);
        }
        parser = (Parser<Object>) obj;
        parser.initialize(context, this);
        return parser;
    }
91258
private function getAnnotations()
    {
        $tokens = array();

        while (null !== $this->lexer->lookahead) {

            // start at the @ symbol
            if (DocLexer::T_AT !== $this->lexer->lookahead['type']) {
                $this->lexer->moveNext();

                continue;
            }

            // something about being preceded by a non-catchable pattern
            $position = $this->lexer->token['position']
                + strlen($this->lexer->token['value']);

            if ((null !== $this->lexer->token)
                && ($this->lexer->lookahead['position'] === $position)) {
                $this->lexer->moveNext();

                continue;
            }

            // make sure we get a valid annotation name
            if ((null === ($glimpse = $this->lexer->glimpse()))
                || ((DocLexer::T_NAMESPACE_SEPARATOR !== $glimpse['type'])
                    && !in_array($glimpse['type'], self::$classIdentifiers))) {
                $this->lexer->moveNext();

                continue;
            }

            // find them all and merge them to the list
            if (null !== ($token = $this->getAnnotation())) {
                $tokens = array_merge($tokens, $token);
            }
        }

        return $tokens;
    }
1203616
protected function getAnnotationColumns()
    {
        if (!isset($this->reader)) {
            return null;
        }

        if (!isset($this->cacheDir)) {
            return null;
        }

        if (!isset($this->annotationCacheFilename)) {
            $this->populateAnnotationCacheFilename();
        }

        if (!$this->debug && null !== $this->annotationColumns) {
            return $this->annotationColumns ?: null;
        }

        // Check mtime of class
        if (is_file($this->annotationCacheFilename)) {
            $result = $this->tryIncludeAnnotationCache();
            if ($result) {
                return $this->annotationColumns;
            }
        }

        // cache annotation
        $this->populateAndCacheAnnotationColumns();

        return $this->annotationColumns ?: null;
    }
405957
final protected function getAnnotationReader(): Reader
    {
        $driver = $this->entityManager->getConfiguration()->getMetadataDriverImpl();
        if ($driver instanceof AnnotationDriver) {
            return $driver->getReader();
        }

        if ($driver instanceof MappingDriverChain) {
            return new MappingDriverChainAdapter($driver);
        }

        throw new Exception('graphql-doctrine requires Doctrine to be configured with a `' . AnnotationDriver::class . '`.');
    }
128161
public IJsonMarshaller getJsonMarshaller(Annotation[] annotations) throws JsonMarshallerException {
		if (annotations != null) {
			for (Annotation annotation : annotations) {
				if (JsonUnmarshaller.class.isAssignableFrom(annotation.annotationType())) {
					return getJsonMarshallerFromAnnotation((JsonUnmarshaller) annotation);
				}
			}
		}
		return null;
	}
152710
public function getAnnotationArray() {
		// lazy instantiation of the annotations array
		if (empty($this->annotations)) {
			// custom parser?
			if (self::$parser) {
				$parser = new self::$parser($this->docs);
				$this->annotations = $parser->getAnnotationArray();
			}
			// use built in parser
			else
				$this->parse();
		}
		return $this->annotations;
	}