java.util.Collection<Plugin>, DomainObjectCollection<Plugin>, DomainObjectSet<Plugin>, java.lang.Iterable<Plugin>, PluginCollection<Plugin>, java.util.Set<Plugin>public interface PluginContainer extends PluginCollection<Plugin>
A PluginContainer is used to manage a set of Plugin instances applied to a
 particular project.
Plugins can be specified using either an id or type. The id of a plugin is specified using a META-INF/gradle-plugins/${id}.properties classpath resource.
| Modifier and Type | Method | Description | 
|---|---|---|
| <T extends Plugin> | apply(java.lang.Class<T> type) | Applies a plugin to the project. | 
| Plugin | apply(java.lang.String id) | Has the same behavior as  apply(Class)except that the plugin is specified via its id. | 
| <T extends Plugin> | findPlugin(java.lang.Class<T> type) | Returns the plugin for the given type. | 
| Plugin | findPlugin(java.lang.String id) | Returns the plugin for the given id. | 
| <T extends Plugin> | getAt(java.lang.Class<T> type) | Returns a plugin with the specified type if this plugin has been used in the project. | 
| Plugin | getAt(java.lang.String id) | Returns a plugin with the specified id if this plugin has been used in the project. | 
| <T extends Plugin> | getPlugin(java.lang.Class<T> type) | Returns a plugin with the specified type if this plugin has been used in the project. | 
| Plugin | getPlugin(java.lang.String id) | Returns a plugin with the specified id if this plugin has been used in the project. | 
| boolean | hasPlugin(java.lang.Class<? extends Plugin> type) | Returns true if the container has a plugin with the given type, false otherwise. | 
| boolean | hasPlugin(java.lang.String id) | Returns true if the container has a plugin with the given id, false otherwise. | 
| void | withId(java.lang.String pluginId,
      Action<? super Plugin> action) | Executes or registers an action for a plugin with given id. | 
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypefindAlladd, addAll, clear, matching, matching, remove, removeAll, whenPluginAdded, whenPluginAdded, withTypePlugin apply(java.lang.String id)
apply(Class) except that the plugin is specified via its id. Not all
 plugins have an id.id - The id of the plugin to be applied.<T extends Plugin> T apply(java.lang.Class<T> type)
type - The type of the plugin to be usedboolean hasPlugin(java.lang.String id)
id - The id of the pluginboolean hasPlugin(java.lang.Class<? extends Plugin> type)
type - The type of the plugin@Nullable Plugin findPlugin(java.lang.String id)
id - The id of the plugin@Nullable <T extends Plugin> T findPlugin(java.lang.Class<T> type)
type - The type of the pluginPlugin getPlugin(java.lang.String id) throws UnknownPluginException
id - The id of the pluginUnknownPluginException - When there is no plugin with the given id.<T extends Plugin> T getPlugin(java.lang.Class<T> type) throws UnknownPluginException
type - The type of the pluginUnknownPluginException - When there is no plugin with the given type.Plugin getAt(java.lang.String id) throws UnknownPluginException
[] operator to call this method from a build script.id - The id of the pluginUnknownPluginException - When there is no plugin with the given id.<T extends Plugin> T getAt(java.lang.Class<T> type) throws UnknownPluginException
[] operator to call this method from a build script.type - The type of the pluginUnknownPluginException - When there is no plugin with the given type.void withId(java.lang.String pluginId,
            Action<? super Plugin> action)
DomainObjectCollection.withType(Class, org.gradle.api.Action).pluginId - the id of the pluginaction - the action