private function resolveParameter(\ReflectionParameter $param, array $args)
    {
        $className = $param->getClass();
        if ($className !== null) {
            return $this->make($className->getName());
        } elseif (isset($args[$param->getName()])) {
            return $args[$param->getName()];
        } elseif ($param->isOptional()) {
            return $param->getDefaultValue();
        } else {
            throw new ClassResolvingException('Cannot resolve Parameter #'.$param->getPosition()." '".$param->getName()."'");
        }
    }