private function registerAnnotations($namespaces)
    {
        if (self::$loader === null) {
            self::$loader = new Loader();
            AnnotationRegistry::registerLoader(self::$loader);
        }

        if ($namespaces !== null) {
            self::$loader->addAll($namespaces);
        } else {
            self::$loader->add(self::CONSTRAINT_ANNOTATIONS_NAMESPACE);
            self::$loader->add(__NAMESPACE__);
        }
    }