|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TaskCollection<T extends Task>
A TaskCollection contains a set of Task instances, and provides a number of query methods.
| Method Summary | ||
|---|---|---|
void |
allTasks(Action<? super T> action)
Executes the given action against all tasks in this collection, and any tasks subsequently added to this collection. |
|
void |
allTasks(groovy.lang.Closure closure)
Executes the given closure against all tasks in this collection, and any tasks subsequently added to this collection. |
|
T |
getAt(java.lang.String name)
Locates an object by name, failing if there is no such task. |
|
T |
getByName(java.lang.String name)
Locates an object by name, failing if there is no such object. |
|
T |
getByName(java.lang.String name,
groovy.lang.Closure configureClosure)
Locates an object by name, failing if there is no such object. |
|
TaskCollection<T> |
matching(Spec<? super T> spec)
Returns a collection which contains the objects in this collection which meet the given specification. |
|
Action<? super T> |
whenTaskAdded(Action<? super T> action)
Adds an Action to be executed when a task is added to this collection. |
|
void |
whenTaskAdded(groovy.lang.Closure closure)
Adds a closure to be called when a task is added to this collection. |
|
|
withType(java.lang.Class<S> type)
Returns a collection containing the objects in this collection of the given type. |
|
| Methods inherited from interface org.gradle.api.DomainObjectCollection |
|---|
allObjects, allObjects, findAll, findByName, getAll, getAsMap, whenObjectAdded, whenObjectAdded, whenObjectRemoved |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
TaskCollection<T> matching(Spec<? super T> spec)
matching in interface DomainObjectCollection<T extends Task>spec - The specification to use.
T getByName(java.lang.String name,
groovy.lang.Closure configureClosure)
throws UnknownTaskException
getByName in interface DomainObjectCollection<T extends Task>name - The object nameconfigureClosure - The closure to use to configure the object.
UnknownTaskException
T getByName(java.lang.String name)
throws UnknownTaskException
getByName in interface DomainObjectCollection<T extends Task>name - The object name
UnknownTaskException<S extends T> TaskCollection<S> withType(java.lang.Class<S> type)
withType in interface DomainObjectCollection<T extends Task>type - The type of objects to find.
Action<? super T> whenTaskAdded(Action<? super T> action)
Action to be executed when a task is added to this collection.
action - The action to be executed
void whenTaskAdded(groovy.lang.Closure closure)
closure - The closure to be calledvoid allTasks(Action<? super T> action)
action - The action to be executedvoid allTasks(groovy.lang.Closure closure)
closure - The closure to be called
T getAt(java.lang.String name)
throws UnknownTaskException
DomainObjectCollection.getByName(String). You can call this method in your build script by using the groovy [] operator.
getAt in interface DomainObjectCollection<T extends Task>name - The object name
UnknownTaskException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||