'Find a referenced type in self or children.
@param qref: A qualified reference.
@type qref: qref
@param classes: A list of classes used to qualify the match.
@type classes: [I{class},...]
@return: The referenced type.
@rtype: L{SchemaObject}
@see: L{qualify()}'

def find(self, qref, classes=()):

    if (not len(classes)):
        classes = (self.__class__,)
    if ((self.qname == qref) and (self.__class__ in classes)):
        return self
    for c in self.rawchildren:
        p = c.find(qref, classes)
        if (p is not None):
            return p
    return None
