Returns classes in package in ordered by number of bases.
321870
def classes(p: ecore.EPackage):
        """"""
        classes = (c for c in p.eClassifiers if isinstance(c, ecore.EClass))
        return sorted(classes, key=lambda c: len(set(c.eAllSuperTypes())))
426530
def get_curent_module_classes(module):
    
    classes = []
    for name, obj in inspect.getmembers(module):
        if inspect.isclass(obj):
            classes.append(obj)
    return classes
131135
def classes(self):
        """"""
        defclass = lib.EnvGetNextDefclass(self._env, ffi.NULL)

        while defclass != ffi.NULL:
            yield Class(self._env, defclass)

            defclass = lib.EnvGetNextDefclass(self._env, defclass)
1269612
def pclass(self, bases):
        
        def discard_constant_fields(cls, **kwargs):
            def ctor():
                return super(huh, cls).__new__(cls, **kwargs)
            try:
                return ctor()
            except AttributeError:
                if u"kind" in kwargs or u"apiVersion" in kwargs:
                    kwargs.pop("kind", None)
                    kwargs.pop("apiVersion", None)
                    return ctor()
                raise


        def lt_pclass(self, other):
            if isinstance(other, self.__class__):
                return sorted(self.serialize().items()) < sorted(other.serialize().items())
            return NotImplemented


        def eq_pclass(self, other):
            if isinstance(other, self.__class__):
                return sorted(self.serialize().items()) == sorted(other.serialize().items())
            return NotImplemented


        content = {
            attr.name: attr.pclass_field_for_attribute()
            for attr
            in self.attributes
        }
        content["__doc__"] = nativeString(self.doc)
        content["serialize"] = _serialize_with_omit
        content["__new__"] = discard_constant_fields
        content["__lt__"] = lt_pclass
        content["__eq__"] = eq_pclass
        content["__hash__"] = PClass.__hash__
        content = total_ordering(content)
        huh = type(nativeString(self.name), bases + (PClass,), content)
        return huh
277761
function class_list() {
  skip_horiz_white();
  classes = [];
  while (look(ident_chain_pattern)) {
    classes.push(ident_chain());
    skip_horiz_white();
  }
  
  return classes;
}
613346
def _collect_classes(
        self, package_paths: Sequence[str], recurse_subpackages: bool = True
    ) -> Sequence[type]:
        
        import uqbar.apis

        classes = []
        initial_source_paths: Set[str] = set()
        # Graph source paths and classes
        for path in package_paths:
            try:
                module = importlib.import_module(path)
                if hasattr(module, "__path__"):
                    initial_source_paths.update(getattr(module, "__path__"))
                else:
                    initial_source_paths.add(module.__file__)
            except ModuleNotFoundError:
                path, _, class_name = path.rpartition(".")
                module = importlib.import_module(path)
                classes.append(getattr(module, class_name))
        # Iterate source paths
        for source_path in uqbar.apis.collect_source_paths(
            initial_source_paths, recurse_subpackages=recurse_subpackages
        ):
            package_path = uqbar.apis.source_path_to_package_path(source_path)
            module = importlib.import_module(package_path)
            # Grab any defined classes
            for name in dir(module):
                if name.startswith("_"):
                    continue
                object_ = getattr(module, name)
                if isinstance(object_, type) and object_.__module__ == module.__name__:
                    classes.append(object_)
        return sorted(classes, key=lambda x: (x.__module__, x.__name__))
1253559
def classes_(self):
        
        if self.__classes is None:
            try:
                return self.estimator.classes_
            except AttributeError:
                return None
        return self.__classes
1334156
def autodiscover(cls,
                     module_paths: List[str],
                     subclass: 'Container' = None) -> None:
        

        def find_base(bases: set, implementation: Type):
            found = {b for b in bases if issubclass(implementation, b)}
            if not found:
                raise ConfigurationError(
                    "No base defined for %r" % implementation)
            elif len(found) > 1:
                raise ConfigurationError(
                    "More than one base found for %r" % implementation)
            else:
                return found.pop()

        def walk(pkg: Union[str, ModuleType]) -> Dict[str, ModuleType]:
            if isinstance(pkg, str):
                pkg: ModuleType = importlib.import_module(pkg)
            results = {}

            try:
                path = pkg.__path__
            except AttributeError:
                results[pkg.__name__] = importlib.import_module(pkg.__name__)
            else:
                for loader, name, is_pkg in pkgutil.walk_packages(path):
                    full_name = pkg.__name__ + '.' + name
                    results[full_name] = importlib.import_module(full_name)
                    if is_pkg:
                        results.update(walk(full_name))
            return results

        with cls._lock:
            for module_path in module_paths:
                walk(module_path)

            config: List[Egg] = []
            for egg_ in egg.factories:
                base_ = find_base(base.classes, egg_.type_)
                egg_.base_ = base_
                config.append(egg_)

            cls.configure(config, subclass=subclass)
522329
def _subclassed(base, *classes):
        
        return all(map(lambda obj: isinstance(obj, base), classes))
56827
def get_canonical_names(packages):
    """"""
    from .vendor.packaging.utils import canonicalize_name

    if not isinstance(packages, Sequence):
        if not isinstance(packages, six.string_types):
            return packages
        packages = [packages]
    return set([canonicalize_name(pkg) for pkg in packages if pkg])
1007166
public List<Class<?>> getClasses(final String pkg, boolean recursive, final Predicate<Class<?>> predicate)
	{
		final long started = System.currentTimeMillis();

		try
		{
			return filter(finder.findClassesInPackage(pkg, recursive), predicate);
		}
		finally
		{
			final long finished = System.currentTimeMillis();
			searchTime.addAndGet(finished - started);

			if (log.isTraceEnabled())
				log.trace("getClasses " +
				          pkg +
				          " with predicate=" +
				          predicate +
				          " returned in " +
				          (finished - started) +
				          " ms");
		}
	}
788759
def subclasses(cls):
        """"""
        seen = set()
        queue = set([cls])

        while queue:
            c = queue.pop()
            seen.add(c)

            sc = c.__subclasses__()
            for c in sc:
                if c not in seen:
                    queue.add(c)

        seen.remove(cls)
        return seen
1205844
def classes(
            self,
            name=None,
            function=None,
            header_dir=None,
            header_file=None,
            recursive=None,
            allow_empty=None):
        """"""
        return (
            self._find_multiple(
                self._impl_matchers[scopedef_t.class_],
                name=name,
                function=function,
                decl_type=self._impl_decl_types[
                    scopedef_t.class_],
                header_dir=header_dir,
                header_file=header_file,
                recursive=recursive,
                allow_empty=allow_empty)
        )
1317162
def get_class_hierarchy(self, base_class):
        
        classes = [base_class]
        while classes[-1] is not None and classes[-1] != "java.lang.Object":
            classes.append(self.get_superclass(classes[-1]))
        return classes[:-1]
999319
public ClassDoc[] classes() {
        ListBuffer<ClassDocImpl> classesToDocument = new ListBuffer<>();
        for (ClassDocImpl cd : cmdLineClasses) {
            cd.addAllClasses(classesToDocument, true);
        }
        for (PackageDocImpl pd : cmdLinePackages) {
            pd.addAllClassesTo(classesToDocument);
        }
        return classesToDocument.toArray(new ClassDocImpl[classesToDocument.length()]);
    }
557721
def GetClassesByArtifact(cls, artifact_name):
    """"""
    return [
        cls.classes[c]
        for c in cls.classes
        if artifact_name in cls.classes[c].supported_artifacts
    ]
623025
public SortedMap<String, Class<?>> getAllClassesMap() {
        Package[] packages = Package.getPackages();
        return getClassesMap(packages);
    }