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

from typing import Any, Optional
from zope.interface.interface import Interface

__docformat__: str

class IElement(Interface):
    __name__: Any = ...
    __doc__: Any = ...
    def getTaggedValue(tag: Any) -> None: ...
    def queryTaggedValue(tag: Any, default: Optional[Any] = ...) -> None: ...
    def getTaggedValueTags() -> None: ...
    def setTaggedValue(tag: Any, value: Any) -> None: ...

class IAttribute(IElement):
    interface: Any = ...

class IMethod(IAttribute):
    def getSignatureInfo() -> None: ...
    def getSignatureString() -> None: ...

class ISpecification(Interface):
    @staticmethod
    def providedBy(object: Any) -> bool: ...
    @staticmethod
    def implementedBy(class_: Any) -> bool: ...
    @staticmethod
    def isOrExtends(other: Any) -> bool: ...
    @staticmethod
    def extends(other: Any, strict: bool = ...) -> None: ...
    @staticmethod
    def weakref(callback: Optional[Any] = ...) -> None: ...
    def get(name: Any, default: Optional[Any] = ...) -> None: ...

class IInterface(ISpecification, IElement):
    def names(all: bool = ...) -> None: ...
    def namesAndDescriptions(all: bool = ...) -> None: ...
    def __getitem__(name: Any) -> None: ...
    def direct(name: Any) -> None: ...
    def validateInvariants(obj: Any, errors: Optional[Any] = ...) -> None: ...
    def __contains__(name: Any) -> None: ...
    def __iter__() -> None: ...
    __module__: Any = ...

class IDeclaration(ISpecification):
    def __contains__(interface: Any) -> None: ...
    def __iter__() -> None: ...
    def flattened() -> None: ...
    def __sub__(interfaces: Any) -> None: ...
    def __add__(interfaces: Any) -> None: ...
    def __nonzero__() -> None: ...

class IInterfaceDeclaration(Interface):
    def providedBy(ob: Any) -> None: ...
    def implementedBy(class_: Any) -> None: ...
    def classImplements(class_: Any, *interfaces: Any) -> None: ...
    def implementer(*interfaces: Any) -> None: ...
    def classImplementsOnly(class_: Any, *interfaces: Any) -> None: ...
    def implementer_only(*interfaces: Any) -> None: ...
    def directlyProvidedBy(object: Any) -> None: ...
    def directlyProvides(object: Any, *interfaces: Any) -> None: ...
    def alsoProvides(object: Any, *interfaces: Any) -> None: ...
    def noLongerProvides(object: Any, interface: Any) -> None: ...
    def implements(*interfaces: Any) -> None: ...
    def implementsOnly(*interfaces: Any) -> None: ...
    def classProvides(*interfaces: Any) -> None: ...
    def provider(*interfaces: Any) -> None: ...
    def moduleProvides(*interfaces: Any) -> None: ...
    def Declaration(*interfaces: Any) -> None: ...

class IAdapterRegistry(Interface):
    def register(required: Any, provided: Any, name: Any, value: Any) -> None: ...
    def registered(required: Any, provided: Any, name: Any = ...) -> None: ...
    def lookup(required: Any, provided: Any, name: str = ..., default: Optional[Any] = ...) -> None: ...
    def queryMultiAdapter(objects: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...) -> None: ...
    def lookup1(required: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...) -> None: ...
    def queryAdapter(object: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...) -> None: ...
    def adapter_hook(provided: Any, object: Any, name: Any = ..., default: Optional[Any] = ...) -> None: ...
    def lookupAll(required: Any, provided: Any) -> None: ...
    def names(required: Any, provided: Any) -> None: ...
    def subscribe(required: Any, provided: Any, subscriber: Any, name: Any = ...) -> None: ...
    def subscriptions(required: Any, provided: Any, name: Any = ...) -> None: ...
    def subscribers(objects: Any, provided: Any, name: Any = ...) -> None: ...

class ComponentLookupError(LookupError): ...
class Invalid(Exception): ...

class IObjectEvent(Interface):
    object: Any = ...

class ObjectEvent:
    object: Any = ...
    def __init__(self, object: Any) -> None: ...

class IComponentLookup(Interface):
    adapters: Any = ...
    utilities: Any = ...
    def queryAdapter(object: Any, interface: Any, name: Any = ..., default: Optional[Any] = ...) -> None: ...
    def getAdapter(object: Any, interface: Any, name: Any = ...) -> None: ...
    def queryMultiAdapter(objects: Any, interface: Any, name: Any = ..., default: Optional[Any] = ...) -> None: ...
    def getMultiAdapter(objects: Any, interface: Any, name: Any = ...) -> None: ...
    def getAdapters(objects: Any, provided: Any) -> None: ...
    def subscribers(objects: Any, provided: Any) -> None: ...
    def handle(*objects: Any) -> None: ...
    def queryUtility(interface: Any, name: str = ..., default: Optional[Any] = ...) -> None: ...
    def getUtilitiesFor(interface: Any) -> None: ...
    def getAllUtilitiesRegisteredFor(interface: Any) -> None: ...

class IRegistration(Interface):
    registry: Any = ...
    name: Any = ...
    info: Any = ...

class IUtilityRegistration(IRegistration):
    factory: Any = ...
    component: Any = ...
    provided: Any = ...

class _IBaseAdapterRegistration(IRegistration):
    factory: Any = ...
    required: Any = ...
    provided: Any = ...

class IAdapterRegistration(_IBaseAdapterRegistration): ...
class ISubscriptionAdapterRegistration(_IBaseAdapterRegistration): ...

class IHandlerRegistration(IRegistration):
    handler: Any = ...
    required: Any = ...

class IRegistrationEvent(IObjectEvent): ...
class RegistrationEvent(ObjectEvent): ...
class IRegistered(IRegistrationEvent): ...
class Registered(RegistrationEvent): ...
class IUnregistered(IRegistrationEvent): ...
class Unregistered(RegistrationEvent): ...

class IComponentRegistry(Interface):
    def registerUtility(component: Optional[Any] = ..., provided: Optional[Any] = ..., name: Any = ..., info: Any = ..., factory: Optional[Any] = ...) -> None: ...
    def unregisterUtility(component: Optional[Any] = ..., provided: Optional[Any] = ..., name: Any = ..., factory: Optional[Any] = ...) -> None: ...
    def registeredUtilities() -> None: ...
    def registerAdapter(factory: Any, required: Optional[Any] = ..., provided: Optional[Any] = ..., name: Any = ..., info: Any = ...) -> None: ...
    def unregisterAdapter(factory: Optional[Any] = ..., required: Optional[Any] = ..., provided: Optional[Any] = ..., name: Any = ...) -> None: ...
    def registeredAdapters() -> None: ...
    def registerSubscriptionAdapter(factory: Any, required: Optional[Any] = ..., provides: Optional[Any] = ..., name: Any = ..., info: str = ...) -> None: ...
    def unregisterSubscriptionAdapter(factory: Optional[Any] = ..., required: Optional[Any] = ..., provides: Optional[Any] = ..., name: Any = ...) -> None: ...
    def registeredSubscriptionAdapters() -> None: ...
    def registerHandler(handler: Any, required: Optional[Any] = ..., name: Any = ..., info: str = ...) -> None: ...
    def unregisterHandler(handler: Optional[Any] = ..., required: Optional[Any] = ..., name: Any = ...) -> None: ...
    def registeredHandlers() -> None: ...

class IComponents(IComponentLookup, IComponentRegistry): ...
