Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.plugins
Interface PluginCollection

    org.gradle.api.plugins.PluginCollection
      org.gradle.api.DomainObjectCollection

All Superinterfaces:
  DomainObjectCollection

    interface PluginCollection
    extends DomainObjectCollection

A `PluginCollection` represents a collection of org.gradle.api.Plugin instances.

author:
  Hans Dockter

Method Summary
`void` | `allPlugins(Action action)` Executes the given action against all plugins in this collection, and any plugins subsequently added to this collection.
`void` | `allPlugins(Closure closure)` Executes the given closure against all plugins in this collection, and any plugins subsequently added to this collection.
`T` | `getAt(java.lang.String name)` {
`T` | `getByName(java.lang.String name)` {
`PluginCollection` | `matching(Spec spec)` {
`Action` | `whenPluginAdded(Action action)` Adds an {
`void` | `whenPluginAdded(Closure closure)` Adds a closure to be called when a plugin is added to this collection.
`PluginCollection` | `withType(java.lang.Class type)` {

Methods inherited from interface DomainObjectCollection
allObjects, allObjects, findAll, findByName, getAll, getAsMap, getAt, getByName, getByName, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType

Methods inherited from interface java.lang.Iterable
iterator

Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll

Method Detail

### allPlugins

    public void allPlugins(Action action)

  Executes the given action against all plugins in this collection, and any plugins subsequently added to this collection.
  param:
    action The action to be executed

### allPlugins

    public void allPlugins(Closure closure)

  Executes the given closure against all plugins in this collection, and any plugins subsequently added to this collection.
  param:
    closure The closure to be called

### getAt

    public T getAt(java.lang.String name)

  {@inheritDoc}

### getByName

    public T getByName(java.lang.String name)

  {@inheritDoc}

### matching

    public PluginCollection matching(Spec spec)

  {@inheritDoc}

### whenPluginAdded

    public Action whenPluginAdded(Action action)

  Adds an `Action` to be executed when a plugin is added to this collection.
  param:
    action The action to be executed
  return:
    the supplied action

### whenPluginAdded

    public void whenPluginAdded(Closure closure)

  Adds a closure to be called when a plugin is added to this collection. The plugin is passed to the closure as the parameter.
  param:
    closure The closure to be called

### withType

    public PluginCollection withType(java.lang.Class type)

  {@inheritDoc}

Groovy Documentation