Groovy Documentation

org.gradle.api.plugins
[Java] Interface PluginCollection

org.gradle.api.plugins.PluginCollection
  java.lang.Iterable
      org.gradle.api.DomainObjectCollection
          org.gradle.api.DomainObjectSet
              java.util.Collection
All Superinterfaces:
Iterable, DomainObjectCollection, DomainObjectSet, Collection

public interface PluginCollection
extends DomainObjectSet

A PluginCollection represents a collection of Plugin instances.

Parameters:
- The type of plugins which this collection contains.


Method Summary
PluginCollection matching(Spec spec)

{@inheritDoc}

PluginCollection matching(Closure closure)

{@inheritDoc}

Action whenPluginAdded(Action action)

Adds an Action to be executed when a plugin is added to this collection.

void whenPluginAdded(Closure closure)

Adds a closure to be called when a plugin is added to this collection.

PluginCollection withType(Class type)

{@inheritDoc}

 
Methods inherited from interface DomainObjectSet
findAll, matching, matching, withType
 
Methods inherited from interface Set
add, equals, hashCode, clear, contains, isEmpty, size, toArray, toArray, addAll, iterator, remove, containsAll, removeAll, retainAll
 
Methods inherited from interface DomainObjectCollection
all, all, findAll, matching, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType, withType
 

Method Detail

matching

public PluginCollection matching(Spec spec)
{@inheritDoc}


matching

public PluginCollection matching(Closure closure)
{@inheritDoc}


whenPluginAdded

@SuppressWarnings("UnusedDeclaration")
public Action whenPluginAdded(Action action)
Adds an Action to be executed when a plugin is added to this collection.
Parameters:
action - The action to be executed
Returns:
the supplied action


whenPluginAdded

@SuppressWarnings("UnusedDeclaration")
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.
Parameters:
closure - The closure to be called


withType

public PluginCollection withType(Class type)
{@inheritDoc}


 

Gradle API 1.12