public function deleteClass(\core_kernel_classes_Class $clazz)
    {
        $returnValue = (bool) false;
        
        if ($clazz->isSubClassOf($this->getRootClass()) && ! $clazz->equals($this->getRootClass())) {
            $returnValue = true;
            
            $instances = $clazz->getInstances();
            foreach ($instances as $instance) {
                $this->deleteResource($instance);
            }
            
            $subclasses = $clazz->getSubClasses(false);
            foreach ($subclasses as $subclass) {
                $returnValue = $returnValue && $this->deleteClass($subclass);
            }
            foreach ($clazz->getProperties() as $classProperty) {
                $returnValue = $returnValue && $this->deleteClassProperty($classProperty);
            }
            $returnValue = $returnValue && $clazz->delete();
        } else {
            \common_Logger::w('Tried to delete class ' . $clazz->getUri() . ' as if it were a subclass of ' . $this->getRootClass()->getUri());
        }
        
        return (bool) $returnValue;
    }