Returns a new reflection class intance for the passed class name.

@param string $className The class name to return the reflection class instance for

@return \AppserverIo\Lang\Reflection\ReflectionClass The reflection instance
194593
public function getReflectionClass($className)
    {

        // check if we've already initialized the reflection class
        if (isset($this->reflectionClasses[$className]) === false) {
            $this->reflectionClasses[$className] = $this->newReflectionClass($className);
        }

        // return the reflection class instance
        return $this->reflectionClasses[$className];
    }
406397
private function createWithReflection($className)
    {
        $class = new ReflectionClass($className);
        $prototypeInstance = $class->newInstanceWithoutConstructor();

        /**
         * @var IPrototype $prototype
         */
        $prototype = new $this->prototypeClass(
            $prototypeInstance,
            $class->getInterfaceNames(),
            $this->getClassConstructorInfo($class),
            $this->getClassOptions($class, $prototypeInstance)
        );

        if (!$prototype instanceof IPrototype) {
            throw new RuntimeException(sprintf(
                'Prototype class "%s" should implement IPrototype.',
                $this->prototypeClass
            ));
        }

        return $prototype;
    }
516371
protected function createClass(string $className)
    {
        if (!class_exists($className)) {
            throw new class("The class $className does not exists") extends Exception implements
                NotFoundExceptionInterface {
            };
        }

        $reflection = new ReflectionClass($className);

        if ($reflection->hasMethod('__construct')) {
            return $reflection->newInstanceArgs($this->arguments);
        }

        return $reflection->newInstance();
    }
246958
public function create($className)
    {
        $builder = new Builder($className, $this);
        $this->getGuesser()->fill($builder);
        return $builder;
    }
431114
public static function create($className) {
        // The best logger configuration for the given class name
        $bestLoggerConfiguration = LoggerManager::findBestLoggerConfigurationForClass($className);

        // If no logger configuration was found for the given class name
        if (!isset($bestLoggerConfiguration)) {
            // Return an empty logger
            return new Logger($className);
        }

        // A logger configuration has been found for the given class name
        $logger = new Logger($className);
        $logger->_targetClassName = $bestLoggerConfiguration['class'];
        $logger->_level = LogLevel::createFromCode($bestLoggerConfiguration['level']);
        $logger->_setupWriters($bestLoggerConfiguration['writers']);

        return $logger;
    }
1172151
public function asSharedInstanceOf($className)
    {
        $endPoint = &$this->getEndPoint();
        $endPoint['lookupType'] = self::TYPE_SHARED;
        $endPoint['className'] = $className;

        return $this;
    }
444855
protected function createProjectClass($className)
    {
        $arguments = func_get_args();
        array_shift($arguments);

        return $this->_projectLoader->createClass($className, $arguments);
    }
1341405
public function classname($classname = null)
    {
        if ($classname === null) {
            return $this->classname;
        }

        $this->classname = $classname;
    }
1320788
public static function instantiate($className)
    {
        $objectManager = self::get()->getObjectManager();
        $args = func_get_args();

        if (1 === count($args)) {
            return $objectManager->get($className);
        }

        return call_user_func_array([$objectManager, 'get'], $args);
    }
675584
public static function getParent($className) {
		$reflection = ClassType::from($className);
		$parent = $reflection->getParentClass();
		return $parent ? $parent->getName() : $parent;
	}
701402
public static function getClassProfile($classname) {
		if (!array_key_exists($classname, self::$profiles))
			self::$profiles[$classname] = new ClassProfile($classname);
		
		return self::$profiles[$classname];
	}
913391
protected function make($className) {
        $refl = new ReflectionClass($className);
        $deps = $this->getDependencies($refl);

        if (empty($deps)) {
            return $refl->newInstance();
        }

        $resolvedDeps = array_map([$this, 'resolveDependency'], $deps);

        return $refl->newInstanceArgs($resolvedDeps);
    }
162990
protected function getCompatibleClass( $className )
  {
    if( ! $className || ! is_string( $className )){
      $className = get_class( $this );
    }
    $class = $className;

    if( ! $this->checkClassForCompability( $class )){
      $class = $this->checkClassForCompability( $class .'Exception' );
    }

    if( ! $class ) {
      if( $parent = get_parent_class( $className ) ) {
        $class = $this->getCompatibleClass( $parent );
      } else {
        $class = __NAMESPACE__ .'\DeferredExceptionsException';
      }
    }

    return $class;
  }
99453
public function addClass($classname)
    {
        $classArr = $this->getClassArray();
        $classArr[] = $classname;
        return $this->setClassArray($classArr);
    }
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];
    }
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];
	}
1097489
protected function reflectClass($className)
    {
        $class = new ClassReflection($className);
        $this->reflectedClassNames[$className] = time();
        foreach ($class->getTagsValues() as $tag => $values) {
            if (array_search($tag, $this->ignoredTags) === false) {
                $this->taggedClasses[$tag][] = $className;
                $this->classTagsValues[$className][$tag] = $values;
            }
        }
        foreach ($class->getProperties() as $property) {
            $propertyName = $property->getName();
            $this->classPropertyNames[$className][] = $propertyName;
            foreach ($property->getTagsValues() as $tag => $values) {
                if (array_search($tag, $this->ignoredTags) === false) {
                    $this->propertyTagsValues[$className][$propertyName][$tag] = $values;
                }
            }
        }
        foreach ($class->getMethods() as $method) {
            $methodName = $method->getName();
            foreach ($method->getTagsValues() as $tag => $values) {
                if (array_search($tag, $this->ignoredTags) === false) {
                    $this->methodTagsValues[$className][$methodName][$tag] = $values;
                }
            }
            foreach ($method->getParameters() as $parameterPosition => $parameter) {
                $this->methodParameters[$className][$methodName][$parameter->getName()] = $this->convertParameterReflectionToArray($parameter, $parameterPosition, $method);
            }
        }
        ksort($this->reflectedClassNames);
        $this->dataCacheNeedsUpdate = true;
    }