private function registerClass()
    {
        try {
            if (!$this->cacheInstance->isCacheValid($this->api, $this->class) || $this->isDevelopment()) {
                $this->parseClass();
            }
        } catch (\Exception $e) {
            $exception = new RestException('Unable to register class "' . $this->class . '". ' . $e->getMessage());
            $exception->setRequestedClass($this->class);
            throw $exception;
        }
    }