Ejemplo n.º 1
0
 def getImplementsOf(self, instance):
     """ returns the interfaces implemented by the instance (flat)"""
     impl = getImplements(instance)
     if not isinstance(impl, tuple):
         impl = (impl,)
     if impl:
         return flattenInterfaces(impl)
Ejemplo n.º 2
0
    def getImplementsOf(self, instance):
        """ returns the interfaces implemented by the instance (flat)"""
        from Interface.Implements import getImplements, flattenInterfaces

        impl = getImplements(instance)
        if type(impl) is not TupleType:
            impl = (impl,)
        if impl:
            return flattenInterfaces(impl)
Ejemplo n.º 3
0
 def getInterfacesOf(self, object):
     """Returns the list of interfaces which are implemented by the object
     """
     impl = getImplements(object)
     if impl:
         if type(impl) in (ListType, TupleType):
             result = flattenInterfaces(impl)
         else:
             result = (impl, )
         return [iface for iface in result if iface is not Interface]
Ejemplo n.º 4
0
 def getInterfacesOf(self, object):
     """Returns the list of interfaces which are implemented by the object
     """
     impl = getImplements(object)
     if impl:
         if type(impl) in (ListType, TupleType):
             result = flattenInterfaces(impl)
         else:
             result = (impl, )
         return [ iface for iface in result if iface is not Interface ]