# Stubs for zope.interface.registry (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Generic, Iterator, Optional, Type, TypeVar, Tuple

T = TypeVar("T")

class _UnhashableComponentCounter:
    def __init__(self, otherdict: Any) -> None: ...
    def __getitem__(self, key: Any): ...
    def __setitem__(self, component: Any, count: Any): ...
    def __delitem__(self, component: Any): ...

class _UtilityRegistrations:
    def __init__(self, utilities: Any, utility_registrations: Any) -> None: ...
    def registerUtility(self, provided: Any, name: Any, component: Any, info: Any, factory: Any) -> None: ...
    def unregisterUtility(self, provided: Any, name: Any, component: Any) -> None: ...

class Components:
    __name__: Any = ...
    __bases__: Any = ...
    def __init__(self, name: str = ..., bases: Any = ...) -> None: ...
    def __reduce__(self): ...
    def registerUtility(self, component: Optional[Any] = ..., provided: Optional[Any] = ..., name: str = ..., info: str = ..., event: bool = ..., factory: Optional[Any] = ...): ...
    def unregisterUtility(self, component: Optional[Any] = ..., provided: Optional[Any] = ..., name: str = ..., factory: Optional[Any] = ...): ...
    def registeredUtilities(self) -> None: ...
    def queryUtility(self, provided: Type[T], name: str = ..., default: Optional[Any] = ...) -> Optional[T]: ...
    def getUtility(self, provided: Type[T], name: str = ...) -> T: ...
    def getUtilitiesFor(self, interface: Type[T]) -> Iterator[Tuple[str, T]]: ...
    def getAllUtilitiesRegisteredFor(self, interface: Any): ...
    def registerAdapter(self, factory: Any, required: Optional[Any] = ..., provided: Optional[Any] = ..., name: str = ..., info: str = ..., event: bool = ...) -> None: ...
    def unregisterAdapter(self, factory: Optional[Any] = ..., required: Optional[Any] = ..., provided: Optional[Any] = ..., name: str = ...): ...
    def registeredAdapters(self) -> None: ...
    def queryAdapter(self, object: Any, interface: Type[T], name: str = ..., default: Optional[Any] = ...) -> Optional[T]: ...
    def getAdapter(self, object: Any, interface: Type[T], name: str = ...) -> T: ...
    def queryMultiAdapter(self, objects: Any, interface: Type[T], name: str = ..., default: Optional[Any] = ...) -> Optional[T]: ...
    def getMultiAdapter(self, objects: Any, interface: Type[T], name: str = ...) -> T: ...
    def getAdapters(self, objects: Any, provided: Type[T]) -> Iterator[Tuple[str, T]]: ...
    def registerSubscriptionAdapter(self, factory: Any, required: Optional[Any] = ..., provided: Optional[Any] = ..., name: str = ..., info: str = ..., event: bool = ...) -> None: ...
    def registeredSubscriptionAdapters(self) -> None: ...
    def unregisterSubscriptionAdapter(self, factory: Optional[Any] = ..., required: Optional[Any] = ..., provided: Optional[Any] = ..., name: str = ...): ...
    def subscribers(self, objects: Any, provided: Type[T]) -> T: ...
    def registerHandler(self, factory: Any, required: Optional[Any] = ..., name: str = ..., info: str = ..., event: bool = ...) -> None: ...
    def registeredHandlers(self) -> None: ...
    def unregisterHandler(self, factory: Optional[Any] = ..., required: Optional[Any] = ..., name: str = ...): ...
    def handle(self, *objects: Any) -> None: ...

class UtilityRegistration:
    def __init__(self, registry: Any, provided: Any, name: Any, component: Any, doc: Any, factory: Optional[Any] = ...) -> None: ...
    def __hash__(self): ...
    def __eq__(self, other: Any): ...
    def __ne__(self, other: Any): ...
    def __lt__(self, other: Any): ...
    def __le__(self, other: Any): ...
    def __gt__(self, other: Any): ...
    def __ge__(self, other: Any): ...

class AdapterRegistration:
    def __init__(self, registry: Any, required: Any, provided: Any, name: Any, component: Any, doc: Any) -> None: ...
    def __hash__(self): ...
    def __eq__(self, other: Any): ...
    def __ne__(self, other: Any): ...
    def __lt__(self, other: Any): ...
    def __le__(self, other: Any): ...
    def __gt__(self, other: Any): ...
    def __ge__(self, other: Any): ...

class SubscriptionRegistration(AdapterRegistration): ...

class HandlerRegistration(AdapterRegistration):
    def __init__(self, registry: Any, required: Any, name: Any, handler: Any, doc: Any) -> None: ...
    @property
    def factory(self): ...
    provided: Any = ...
