returns an array of plugin classes by looking in the object space for all loaded classes
 that start with Retrospec::Plugins::V1
502111
def plugin_classes
       unless @plugin_classes
         load_plugins
         @plugin_classes = ObjectSpace.each_object(Class).find_all { |c| c.name =~ /Retrospec::Plugins/} - excluded_classes || []
       end
       @plugin_classes
     end
929234
def get_model_classes(self):
        
        self._import_plugins()
        return [plugin.model for plugin in self.plugins.values()]
944764
private Map<String, List<String>> findImplementations(ClassLoader loader,
                                                          List<Class<?>> interfaceClasses) throws MojoExecutionException {
        Map<String, List<String>> serviceImplementations = new HashMap<String, List<String>>();
        for (String interfaceClassName : getServices()) {
            serviceImplementations.put(interfaceClassName, new ArrayList<String>());
        }
        getLog().info("Scanning generated classes for implementations...");
        File classFolder = getClassFolder();
        List<String> classNames = listCompiledClasses(classFolder);
        // List<String> classNames = listCompiledClassesRegex( classFolder );
        for (String className : classNames) {
            try {
                if(getLog().isDebugEnabled()){
                    getLog().debug("checking class: " + className);
                }
                Class<?> cls = loader.loadClass(className);
                int mods = cls.getModifiers();
                if (!cls.isAnonymousClass() && !cls.isInterface()
                        && !cls.isEnum() && !Modifier.isAbstract(mods)
                        && Modifier.isPublic(mods)) {
                    for (Class<?> interfaceCls : interfaceClasses) {
                        if (!interfaceCls.equals(cls) && interfaceCls.isAssignableFrom(cls)) {
                            
                            // if the includes section isn't empty, we need to respect the choice and only include the items that are shown there.
                            if (includes == null || includes.length == 0) {
                                serviceImplementations.get(interfaceCls.getName()).add(className);
                            } else {
                                for ( String include : includes )
                                {
                                    if(SelectorUtils.match(include, className)) {
                                        serviceImplementations.get(interfaceCls.getName()).add(className);
                                    }
                                }
                            }
                            
                        }
                    }
                }
            } catch (ClassNotFoundException e1) {
                getLog().warn(e1);
            } catch (NoClassDefFoundError e2) {
                getLog().warn(e2);
            }
            
        }
        
        // in the next iteration we start to process with the excludes
        if (excludes != null && excludes.length != 0) {
            Set<Entry<String,List<String>>> entrySet = serviceImplementations.entrySet();
            for ( Entry<String, List<String>> entry : entrySet )
            {
                classNames = entry.getValue();
                ListIterator<String> classNamesIter = classNames.listIterator();
                
                while ( classNamesIter.hasNext())
                {
                    String className = classNamesIter.next();
                    for ( String exclude : excludes )
                    {
                        if(SelectorUtils.match(exclude, className)) {
                          classNamesIter.remove();
                          break;
                        }
                    }
                }
            }
        }
        return serviceImplementations;
    }
704138
protected function getPluginClasses($refresh = false)
    {
        if ($refresh || !$this->pluginClasses) {
            $this->pluginClasses = [];
            $files = $this->globByDirs($this->dirs, '/Plugin.php');
            foreach ($files as $file) {
                $class = $this->guessClassName($file);

                $name = explode('\\', $class)[1];
                $name = $this->dash($name);

                $this->pluginClasses[$name] = $class;
            }
            ksort($this->pluginClasses);
        }

        return $this->pluginClasses;
    }
466633
def _get_plugins_by_entry_points(self):
        
        # Let's find and register every plugin, which is in sys.path and has defined a entry_point 'groundwork.plugin'
        # in it's setup.py
        entry_points = []
        classes = {}
        for entry_point in iter_entry_points(group='groundwork.plugin', name=None):
            entry_points.append(entry_point)

        for entry_point in entry_points:
            try:
                entry_point_object = entry_point.load()
            except Exception as e:
                # We should not throw an exception now, because a package/entry_point can be outdated, using an old
                # api from groundwork, tries to import unavailable packages, what ever...
                # We just do not make it available. That's all we can do.
                self._log.debug("Couldn't load entry_point %s. Reason: %s" % (entry_point.name, e))
                continue

            if not issubclass(entry_point_object, GwBasePattern):
                self._log.warning("entry_point  %s is not a subclass of groundworkPlugin" % entry_point.name)
                continue
            plugin_name = entry_point_object.__name__

            plugin_class = self.register_class(entry_point_object, plugin_name,
                                               entrypoint_name=entry_point.name,
                                               distribution_path=entry_point.dist.location,
                                               distribution_key=entry_point.dist.key,
                                               distribution_version=entry_point.dist.version)

            classes[plugin_name] = plugin_class
            # classes[plugin_name] = {
            #     "name": plugin_name,
            #     "entry_point": entry_point.name,
            #     "path": entry_point.dist.location,
            #     "class": entry_point_object,
            #     "distribution": {
            #         "key": entry_point.dist.key,
            #         "version": entry_point.dist.version
            #     },
            # }
            self._log.debug("Found plugin: %s at entry_point %s of package %s (%s)" % (plugin_name, entry_point.name,
                                                                                       entry_point.dist.key,
                                                                                       entry_point.dist.version))
        return classes
1027472
def getCounts
      result = {}
      @classes.each do |c|
        count = 0
        ObjectSpace.each_object(c){ count += 1 }
        result[c] = count
      end
      result
    end
707790
def get_plugins(cls, *args, **kwargs):
        
        return [plugin(*args, **kwargs) for plugin in cls.plugins]
1215221
def GetNames(cls):
    
    names = []
    for plugin_class in cls._plugins.values():
      name = getattr(plugin_class, 'ARTIFACT_DEFINITION_NAME', None)
      if name:
        names.append(name)

    return names
1240712
def gather_plugins(self):
        
        plugins = []
        cfg = get_core_config()
        pathenv = cfg['jukebox']['pluginpaths']
        pathenv = os.pathsep.join((pathenv, os.environ.get("JUKEBOX_PLUGIN_PATH", "")))
        paths = pathenv.split(os.pathsep)
        # first find built-ins then the ones in the config, then the one from the environment
        # so user plugins can override built-ins
        for p in reversed(paths):
            if p and os.path.exists(p):  # in case of an empty string, we do not search!
                plugins.extend(self.find_plugins(p))
        return plugins
581896
def get_plugins(namespace, interface=None, check_extras=True, load_now=False):
    
    return _DB.add_namespace(namespace, interface, check_extras, load_now)
263074
function findDefaultPlugins() {
  const globPath = path.join(__dirname, BUILT_IN_DEFAULT_PLUGIN_FOLDER_NAME);
  if (!fs.existsSync(globPath)) {
    return [];
  }
  return walkSync(globPath, {
    directories: false,
    globs: [`${MARKBIND_PLUGIN_PREFIX}*.js`],
  }).map(file => path.parse(file).name);
}
1308018
def _iter_lexerclasses(plugins=True):
    """"""
    for key in sorted(LEXERS):
        module_name, name = LEXERS[key][:2]
        if name not in _lexer_cache:
            _load_lexers(module_name)
        yield _lexer_cache[name]
    if plugins:
        for lexer in find_plugin_lexers():
            yield lexer
635066
def load_plugins():
        
        plugin_cls = {}
        for entry_point in pkg_resources.iter_entry_points('docker_interface.plugins'):
            cls = entry_point.load()
            assert cls.COMMANDS is not None, \
                "plugin '%s' does not define its commands" % entry_point.name
            assert cls.ORDER is not None, \
                "plugin '%s' does not define its priority" % entry_point.name
            plugin_cls[entry_point.name] = cls
        return plugin_cls
100897
def _get_parent_classes_transparent(cls, slot, page, instance=None):
        
        parent_classes = super(CascadePluginBase, cls).get_parent_classes(slot, page, instance)
        if parent_classes is None:
            if cls.get_require_parent(slot, page) is False:
                return
            parent_classes = []

        # add all plugins marked as 'transparent', since they all are potential parents
        parent_classes = set(parent_classes)
        parent_classes.update(TransparentContainer.get_plugins())
        return list(parent_classes)
381327
def class_names op, deep_inheritance = false
    ret = []
    unless op.is_a? Sfcc::Cim::ObjectPath
      op = Sfcc::Cim::ObjectPath.new(op.to_s, nil) # assume namespace
    end
    flags = deep_inheritance ? Sfcc::Flags::DeepInheritance : 0
    begin
      @client.class_names(op, flags).each do |name|
	ret << name.to_s
      end
    rescue Sfcc::Cim::ErrorInvalidNamespace
    end
    ret
  end
942919
public List getPlugins(final Class pluginClass) {
        synchronized (pluginMap) {
            List pluginList = new ArrayList(pluginMap.size());
            Iterator iter = pluginMap.values().iterator();

            while (iter.hasNext()) {
                Object plugin = iter.next();

                if (pluginClass.isInstance(plugin)) {
                    pluginList.add(plugin);
                }
            }
            return pluginList;
        }
    }
277699
private static ClassLoader[] getClassLoaders(ClassLoader classLoader) {
		return new ClassLoader[] { classLoader, Thread.currentThread().getContextClassLoader(), ClassLoaderUtils.class.getClassLoader(),
				systemClassLoader };
	}