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:
java.lang.Iterable, DomainObjectCollection, DomainObjectSet, java.util.Collection

public interface PluginCollection
extends DomainObjectSet

A PluginCollection represents a collection of Plugin instances.

Parameters:
- The type of plugins which this collection contains.
Authors:
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(groovy.lang.Closure closure)

Executes the given closure against all plugins in this collection, and any plugins subsequently added to this collection.

PluginCollection matching(Spec spec)

{@inheritDoc}

PluginCollection matching(groovy.lang.Closure closure)

{@inheritDoc}

Action whenPluginAdded(Action action)

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

void whenPluginAdded(groovy.lang.Closure closure)

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

PluginCollection withType(java.lang.Class type)

{@inheritDoc}

 
Methods inherited from interface DomainObjectSet
findAll, matching, matching, withType
 
Methods inherited from interface DomainObjectCollection
all, all, allObjects, allObjects, findAll, findAll, getAll, matching, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType, withType
 
Methods inherited from interface java.util.Set
java.util.Set#add(java.lang.Object), java.util.Set#equals(java.lang.Object), java.util.Set#hashCode(), java.util.Set#clear(), java.util.Set#isEmpty(), java.util.Set#contains(java.lang.Object), java.util.Set#addAll(java.util.Collection), java.util.Set#size(), java.util.Set#toArray([Ljava.lang.Object;), java.util.Set#toArray(), java.util.Set#iterator(), java.util.Set#remove(java.lang.Object), java.util.Set#removeAll(java.util.Collection), java.util.Set#containsAll(java.util.Collection), java.util.Set#retainAll(java.util.Collection)
 

Method Detail

allPlugins

@Deprecated
public void allPlugins(Action action)
Executes the given action against all plugins in this collection, and any plugins subsequently added to this collection.
deprecated:
Use all(org.gradle.api.Action) instead.
Parameters:
action - The action to be executed


allPlugins

@Deprecated
public void allPlugins(groovy.lang.Closure closure)
Executes the given closure against all plugins in this collection, and any plugins subsequently added to this collection.
deprecated:
Use all(groovy.lang.Closure) instead.
Parameters:
closure - The closure to be called


matching

public PluginCollection matching(Spec spec)
{@inheritDoc}


matching

public PluginCollection matching(groovy.lang.Closure closure)
{@inheritDoc}


whenPluginAdded

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

public void whenPluginAdded(groovy.lang.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(java.lang.Class type)
{@inheritDoc}


 

Groovy Documentation