public function instantiateClass(string $className, array $args)
    {
        $class = $this->getClass($className);
        $constructor = $class->getConstructor();
        if (empty($constructor)) {
            $instance = $class->newInstanceWithoutConstructor();
        } else {
            $instance = $class->newInstanceArgs($args);
        }
        return $instance;
    }