public function addClass($class, $extends = null, $implements = [])
    {
        $classId = $this->registerClass($class);
        if ($extends) {
            $parentClassId = $this->registerClass($extends);
            $this->extends[$classId] = [$parentClassId];
        }
        if (!empty($implements)) {
            $interfaceIds = [];
            foreach ($implements as $interface) {
                $interfaceIds[] = $this->registerInterface($interface);
            }
            $this->implements[$classId] = $interfaceIds;
        }
    }