public function has($id)
    {

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getNamingDirectory()->search(
            sprintf('php:global/%s/%s', $this->getApplication()->getUniqueName(), ObjectManagerInterface::IDENTIFIER)
        );

        // query whether or not a object descriptor or the class definition exists
        return class_exists($id) || $objectManager->hasObjectDescriptor($id) || Environment::singleton()->hasAttribute($id);
    }