Returns the metadata for a given class name.

@param string $className

@return ClassMetadata|false the class metadata
172424
public function getClassMetadata($className)
    {
        if (!$this->initialized) {
            $this->initialize();
        }
        if (array_key_exists($className, $this->metadata)) {
            return $this->metadata[$className];
        }

        return false;
    }
38737
private static function retrieveNameOfSuperclassFor($className)
    {
        $parents = self::hierarchy($className);

        return (true === empty($parents))
            ? $className
            : $parents[count($parents) - 1]->name;
    }
43812
public function getFullName($className)
    {
        $isFunction = $this->currentMethod && $this->currentMethod instanceof FunctionDefinition;
        $namespace = $isFunction ? $this->currentMethod->getNamespace() : $this->classDefinition->getNamespace();

        return fqcn($className, $namespace, $this->aliasManager);
    }
701402
public static function getClassProfile($classname) {
		if (!array_key_exists($classname, self::$profiles))
			self::$profiles[$classname] = new ClassProfile($classname);
		
		return self::$profiles[$classname];
	}
849649
public function getClassByName($className)
    {
        $classMap = $this->getClassMap($this->splitClassName($className)) . "[\"__class\"]";
        $return = null;

        eval(
            "if (isset(\$this->indexedClasses$classMap)) {"
            . " \$return = \$this->indexedClasses$classMap;"
            . "}"
        );

        return $return;
    }
835766
public function getClassDefinition($className)
    {
        foreach ($this->definitions as $key => $value) {
            if (!strcasecmp($key, $className)) {
                return $value;
            }
        }

        return false;
    }
844080
public function getMetadata($className, $subset)
	{
		$classMetadataCacheKey = $this->getClassMetadataCacheKey($className);
		$classMetadata = $this->cacheStorage->getItem($classMetadataCacheKey);
		if ($classMetadata === null)
		{
			$classMetadata = $this->readClassMetadata($className);
			$this->cacheStorage->addItem($classMetadataCacheKey, $classMetadata);
		}
		if (!is_array($classMetadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for class %s.', $className));
		}
		if (!isset($classMetadata[$subset]))
		{
			throw new \LogicException(sprintf('No metadata for subset "%s" in class %s.', $subset, $className));
		}
		$subsetMetadata = $classMetadata[$subset];
		if (!($subsetMetadata instanceof DT\Metadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for subset "%s" in class %s.', $subset, $className));
		}
		return $subsetMetadata;
	}
681835
private function getClassInfo(string $className): stdClass
    {
        $json = $this->getLastJsonResponse();

        if (isset($json->{'hydra:supportedClass'})) {
            foreach ($json->{'hydra:supportedClass'} as $classData) {
                if ($classData->{'hydra:title'} === $className) {
                    return $classData;
                }
            }
        }

        throw new \InvalidArgumentException(sprintf('Class %s cannot be found in the vocabulary', $className));
    }
614734
private function getMetadata($class)
    {
        $class = ClassUtils::getRealClass(ltrim($class, '\\'));

        if (!array_key_exists($class, $this->metadataCache)) {
            $this->metadataCache[$class] = null;

            if (null !== $manager = $this->registry->getManagerForClass($class)) {
                $this->metadataCache[$class] = $manager->getClassMetadata($class);
            }
        }

        return $this->metadataCache[$class];
    }
467099
public static function getClassBaseName($className): string
    {
        $className = ToString::toString($className);
        if (\preg_match('~\\\(?<basename>[^\\\]+)$~u', $className, $matches) === 0) {
            return $className; // no namespace at all
        }

        return $matches['basename']; // without namespace
    }
86955
public function getMetadataFor(string $className) : ClassMetadata
    {
        if (isset($this->loadedMetadata[$className])) {
            return $this->loadedMetadata[$className];
        }

        // Check for namespace alias
        if (strpos($className, ':') !== false) {
            [$namespaceAlias, $simpleClassName] = explode(':', $className, 2);

            $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName);
        } else {
            $realClassName = $this->getRealClass($className);
        }

        if (isset($this->loadedMetadata[$realClassName])) {
            // We do not have the alias name in the map, include it
            return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
        }

        $loadingException = null;

        try {
            if ($this->cacheDriver !== null) {
                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);

                if ($cached instanceof ClassMetadata) {
                    $this->loadedMetadata[$realClassName] = $cached;

                    $this->wakeupReflection($cached, $this->getReflectionService());
                } else {
                    foreach ($this->loadMetadata($realClassName) as $loadedClassName) {
                        $this->cacheDriver->save(
                            $loadedClassName . $this->cacheSalt,
                            $this->loadedMetadata[$loadedClassName]
                        );
                    }
                }
            } else {
                $this->loadMetadata($realClassName);
            }
        } catch (MappingException $loadingException) {
            $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName);

            if ($fallbackMetadataResponse === null) {
                throw $loadingException;
            }

            $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse;
        }

        if ($className !== $realClassName) {
            // We do not have the alias name in the map, include it
            $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
        }

        return $this->loadedMetadata[$className];
    }
1341405
public function classname($classname = null)
    {
        if ($classname === null) {
            return $this->classname;
        }

        $this->classname = $classname;
    }
405715
public static function getClassProfile($classname) {
		if (!is_string($classname) || empty($classname)) {
			throw new \InvalidArgumentException("Argument is not a valid class name");
		}
		
		//check if is already stored
		if (array_key_exists($classname, self::$profiles)) {
			return self::$profiles[$classname];
		}
		
		//validate classname
 		if (!class_exists($classname, true)) {
 			throw new \RuntimeException("Class %s could not be found");
 		}
		
		//build profile and return
		self::$profiles[$classname] = new ClassProfile($classname);
		return self::$profiles[$classname];
	}
330830
public function getMetaData($key)
    {
        if (!isset($this->metaData[$key])) {
            return false;
        }
        
        return $this->metaData[$key];
    }
95893
public static function getClassAnnotations($className)
    {
        if (!isset(self::$annotationCache[$className])) {
            $class = new \ReflectionClass($className);
            self::$annotationCache[$className] = self::parseAnnotations($class->getDocComment());
        }

        return self::$annotationCache[$className];
    }
593587
public function getMetadataFor($className)
    {
        if (!$this->hasMetadataFor($className)) {
            $metadata = new ClassMetadata($className);
            $this->populateMetadata($metadata);
            $this->setMetadataFor($className, $metadata);
        }

        return $this->metadata[$className];
    }
654459
public function getClassMetadata()
    {
        $class = $this->class;
        if ($this->classMetadata === null) {
            $classMetadata = $this->metadata->loadMetadataForClass($class);
            $this->classMetadata = $classMetadata;
        }

        return $this->classMetadata;
    }