Get the list of plugins that have been detached since a specific Jenkins release version.

@param since The Jenkins version.
@return A {@link List} of {@link DetachedPlugin}s.
@see #getDetachedPlugins()
545061
public static @Nonnull
    List<DetachedPlugin> getDetachedPlugins(@Nonnull VersionNumber since) {
        return getDetachedPlugins().stream()
                .filter(detachedPlugin -> !detachedPlugin.getSplitWhen().isOlderThan(since))
                .collect(Collectors.toList());
    }
373153
@SuppressWarnings( "unchecked" )
    private Set<Plugin> getAllPlugins( MavenProject project, Lifecycle lifecycle )
        throws PluginNotFoundException, LifecycleExecutionException

    {
        log.debug( "RequirePluginVersions.getAllPlugins:" );

        Set<Plugin> plugins = new HashSet<Plugin>();
        // first, bind those associated with the packaging
        Map mappings = findMappingsForLifecycle( project, lifecycle );

        Iterator iter = mappings.entrySet().iterator();
        while ( iter.hasNext() )
        {
            Entry entry = (Entry) iter.next();
            log.debug( "  lifecycleMapping = " + entry.getKey() );
            String pluginsForLifecycle = (String) entry.getValue();
            log.debug( "  plugins = " + pluginsForLifecycle );
            if ( StringUtils.isNotEmpty( pluginsForLifecycle ) )
            {
                String pluginList[] = pluginsForLifecycle.split( "," );
                for ( String plugin : pluginList )
                {
                    plugin = StringUtils.strip( plugin );
                    log.debug( "    plugin = " + plugin );
                    String tokens[] = plugin.split( ":" );
                    log.debug( "    GAV = " + Arrays.asList( tokens ) );

                    Plugin p = new Plugin();
                    p.setGroupId( tokens[0] );
                    p.setArtifactId( tokens[1] );
                    plugins.add( p );
                }
            }
        }

        List<String> mojos = findOptionalMojosForLifecycle( project, lifecycle );
        for ( String value : mojos )
        {
            String tokens[] = value.split( ":" );

            Plugin plugin = new Plugin();
            plugin.setGroupId( tokens[0] );
            plugin.setArtifactId( tokens[1] );
            plugins.add( plugin );
        }

        plugins.addAll( project.getBuildPlugins() );

        return plugins;
    }
1291065
public static <T extends BuildStep&Describable<T>>
    List<Descriptor<T>> filter(List<Descriptor<T>> base, Class<? extends AbstractProject> type) {
        // descriptor of the project
        Descriptor pd = Jenkins.getInstance().getDescriptor((Class) type);

        List<Descriptor<T>> r = new ArrayList<>(base.size());
        for (Descriptor<T> d : base) {
            if (pd instanceof AbstractProjectDescriptor && !((AbstractProjectDescriptor)pd).isApplicable(d))
                continue;

            if (d instanceof BuildStepDescriptor) {
                BuildStepDescriptor<T> bd = (BuildStepDescriptor<T>) d;
                if(!bd.isApplicable(type))  continue;
                r.add(bd);
            } else {
                // old plugins built before 1.150 may not implement BuildStepDescriptor
                r.add(d);
            }
        }
        return r;
    }
990611
public static boolean isDetachedPlugin(@Nonnull String pluginId) {
        for (DetachedPlugin detachedPlugin : getDetachedPlugins()) {
            if (detachedPlugin.getShortName().equals(pluginId)) {
                return true;
            }
        }

        return false;
    }
1120162
function getPlugins()
{
	var results = []

	if (extensions && extensions.hasOwnProperty('plugins')) {

		for(var type in extensions.plugins) {
			var sourceArray = extensions.plugins[type];

			for (index = 0; index < sourceArray.length; ++index) {
			    results.push(type + '.' + sourceArray[index]);
			}
		}
	}

	return results;
}
773765
@Override
    public List<PluginData> getPluginData() {
        List<PluginData> results = new ArrayList<>();
        for (Field field : getClass().getDeclaredFields()) {
            if (field.isAnnotationPresent(Plugin.Data.class)) {
                String fileName = getFileName(field);
                results.add(new PluginData(fileName, getFieldValue(field)));
            }
        }
        return results;
    }
1219884
public List<AbstractPlugin> getPlugins() {
        if (pluginCache.isEmpty()) {
            LOGGER.info("Plugin cache miss, reload");

            load();
        }

        final List<AbstractPlugin> ret = new ArrayList<>();

        for (final Map.Entry<String, HashSet<AbstractPlugin>> entry : pluginCache.entrySet()) {
            ret.addAll(entry.getValue());
        }

        return ret;
    }
715780
public static String getBuildPluginVersion(AbstractWisdomMojo mojo, String plugin) {
        List<Plugin> plugins = mojo.project.getBuildPlugins();
        for (Plugin plug : plugins) {
            if (plug.getArtifactId().equals(plugin)) {
                return plug.getVersion();
            }
        }
        // Not found.
        return null;
    }
689701
public <P extends Plugin> List<P> getPlugins(Class<P> clazz) {
        List<P> result = new ArrayList<>();
        for (PluginWrapper w: pluginManager.getPlugins(clazz)) {
            result.add((P)w.getPlugin());
        }
        return Collections.unmodifiableList(result);
    }
1135574
public boolean syncPlugins(NewRelicCache cache)
    {
        boolean ret = true;

        if(apiClient == null)
            throw new IllegalArgumentException("null API client");

        // Get the Plugins configuration using the REST API
        if(cache.isPluginsEnabled())
        {
            ret = false;

            logger.info("Getting the plugins");
            Collection<Plugin> plugins = apiClient.plugins().list(true);
            for(Plugin plugin : plugins)
            {
                cache.plugins().add(plugin);

                logger.fine("Getting the components for plugin: "+plugin.getId());
                Collection<PluginComponent> components = apiClient.pluginComponents().list(PluginComponentService.filters().pluginId(plugin.getId()).build());
                cache.plugins().components(plugin.getId()).add(components);
            }

            cache.setUpdatedAt();

            ret = true;
        }

        return ret;
    }
717087
static public List<Object> toDeprecatedObjectList(List<DisabledJob> disabledJobs) {
    return disabledJobs.stream().map( x -> {
          if (x == null) {
            return null;
          }
          else {
            return x.toDeprecatedObject();
          }
    }
    ).collect(Collectors.toList());
  }
228434
private static Iterable<PluginWrapper> getPluginsSorted() {
        PluginManager pluginManager = Jenkins.getInstance().getPluginManager();
        return getPluginsSorted(pluginManager);
    }
512145
public List<PluginInfo> getUpdates() {
        List<PluginInfo> updates = new ArrayList<>();
        for (PluginWrapper installed : pluginManager.getPlugins()) {
            String pluginId = installed.getPluginId();
            if (hasPluginUpdate(pluginId)) {
                updates.add(getPluginsMap().get(pluginId));
            }
        }

        return updates;
    }
994874
public List<MoskitoPlugin> getPlugins() {
		ArrayList<MoskitoPlugin> ret = new ArrayList<MoskitoPlugin>(plugins.values());
		return ret;
	}
519905
def plugins(cls, enabled=True):
        
        cls.loadPlugins()
        plugs = getattr(cls, '_%s__plugins' % cls.__name__, {}).values()
        if enabled is None:
            return plugs

        return filter(lambda x: x.isEnabled() == enabled, plugs)
1350817
public Plugin[] getPlugins() {
		if (mPluginContext != null) {
			Collection c = mPluginContext.getPlugins().values();
			if (c != null) {
				return (Plugin[])c.toArray(new Plugin[c.size()]);
			}
		}
		return new Plugin[0];
	}
1321674
public static DescriptorExtensionList<RepositoryBrowser<?>,Descriptor<RepositoryBrowser<?>>> all() {
        return (DescriptorExtensionList) Jenkins.getInstance().getDescriptorList(RepositoryBrowser.class);
    }