Return tuple of base classes (including cls) in method resolution order.
979330
def getmro(cls):
    ""
    if hasattr(cls, "__mro__"):
        return cls.__mro__
    else:
        result = []
        _searchbases(cls, result)
        return tuple(result)
129947
def all_methods(cls):
        
        def name(fn):
            return fn.__get__(cls).__name__.replace("_", "-")
        return sorted(name(f) for f in cls.__dict__.values()
                      if isinstance(f, staticmethod))
1203095
private Iterable<CtMethod> getMethodsFrom(CtClass superClass) {
        // return declared methods, then all methods (caller will de-dupe)
        List<CtMethod> methods = new ArrayList<CtMethod>();

        methods.addAll(Arrays.asList(superClass.getDeclaredMethods()));
        methods.addAll(Arrays.asList(superClass.getMethods()));

        return methods;
    }
684366
def get_tuple(self):
        """"""
        objType, objInstance = self.value

        if isinstance(objType, int):
            pass
        elif isinstance(objType, long):
            objType = int(objType)
        elif isinstance(objType, basestring):
            # turn it back into an integer
            objType = self.objectTypeClass()[objType]
        else:
            raise TypeError("invalid datatype for objType")

        # pack the components together
        return (objType, objInstance)
837674
def make(base_classes=(), have_mt=False):
        """"""

        good_bc = ModelFactory.__fix_bases(base_classes, have_mt)
        print "Base classes are:", good_bc
        key = "".join(map(str, good_bc))
        if key in ModelFactory.__memoized:
            return ModelFactory.__memoized[key]

        cls = new.classobj('', good_bc, {'__module__': '__main__', '__doc__': None})
        ModelFactory.__memoized[key] = cls
        return cls
557721
def GetClassesByArtifact(cls, artifact_name):
    """"""
    return [
        cls.classes[c]
        for c in cls.classes
        if artifact_name in cls.classes[c].supported_artifacts
    ]
1173965
public static Method[] getDeclaredMethods(Class clazz) {
	Method[] methods = clazz.getMethods();
	ArrayList list = new ArrayList();
	for (int i = 0; i < methods.length; i++) {
	    if (methods[i].getDeclaringClass() == clazz) list.add(methods[i]);
	}
	if (list.size() == 0) return new Method[0];
	return (Method[]) list.toArray(new Method[list.size()]);
    }
1224912
def get_unpatched_class(cls):
    
    external_bases = (
        cls
        for cls in _get_mro(cls)
        if not cls.__module__.startswith('setuptools')
    )
    base = next(external_bases)
    if not base.__module__.startswith('distutils'):
        msg = "distutils has already been patched by %r" % cls
        raise AssertionError(msg)
    return base
411935
def class_factory(name, base_class, class_dict):
    """"""

    def __init__(self, tcex):
        base_class.__init__(self, tcex)
        for k, v in class_dict.items():
            setattr(self, k, v)

    newclass = type(str(name), (base_class,), {'__init__': __init__})
    return newclass
130695
def superclasses(self, inherited=False):
        
        data = clips.data.DataObject(self._env)

        lib.EnvClassSuperclasses(
            self._env, self._cls, data.byref, int(inherited))

        for klass in classes(self._env, data.value):
            yield klass
476621
def _get_classes_to_inspect(self):
        
        return tuple(filter(lambda c:
                      SerializableMixIn._get_version(c, require=False) or
                      (SerializableMixIn._get_serialize_fields(c) or
                       SerializableMixIn._get_interpolation_map(c)),
                      self.__class__.__mro__))
135038
private List<Class<?>> getGenericParameterClasses(Method setterMethod, int depth) {
        Type t = setterMethod.getGenericParameterTypes()[0];
        ParameterizedType pType = (ParameterizedType) t;
        List<Class<?>> classes = new ArrayList<>();
        for (int i = 0; i < depth; i++) {
            classes.add((Class<?>) pType.getActualTypeArguments()[i]);
        }
        return classes;
    }
1038805
def list_hierarchy(class_name, bases):
    

    class_list = [Uri(class_name)]
    for base in bases:
        if base.__name__ not in IGNORE_CLASSES:
            class_list.append(Uri(base.__name__))
    return list([i for i in set(class_list)])
132869
def get_handler_classes(self):
        """"""

        handler_classes = [import_string(handler_cls) for handler_cls in settings.MODERNRPC_HANDLERS]

        if self.protocol == ALL:
            return handler_classes
        else:
            return [cls for cls in handler_classes if cls.protocol in ensure_sequence(self.protocol)]
954601
def coll_to_tuples(cls, coll):
        
        if isinstance(coll, basestring):
            raise exc.CollectionCoerceError(
                passed=coll,
                colltype=cls,
            )
        if isinstance(coll, collections.Mapping):
            i = 0
            for k in sorted(coll.keys()):
                yield (i, coll[k])
        elif isinstance(coll, (collections.Sequence, types.GeneratorType)) or (
            hasattr(coll, "next") and callable(coll.next)
        ) or (
            hasattr(coll, "__iter__") and callable(coll.__iter__)
        ):
            i = 0
            for v in coll:
                yield i, v
                i += 1
        elif not coll:
            return
        else:
            raise exc.CollectionCoerceError(
                passed=coll,
                colltype=cls,
            )
140982
def get_reference_templates(self, ref_types):
        """"""
        return OrderedDict([(x, self.get_reference_template(x)) for x in ref_types])
928521
def factory(cls, class_name):
        
        class_name = str(class_name.lstrip('_'))
        types = ParseResource.__subclasses__()
        while types:
            t = types.pop()
            if t.__name__ == class_name:
                return t
            types.extend(t.__subclasses__())
        else:
            return type(class_name, (Object,), {})