|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of tasks which this collection contains.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)
Deprecated. Use DomainObjectCollection.all(org.gradle.api.Action) instead. |
|
void |
allTasks(Closure closure)
Deprecated. Use DomainObjectCollection.all(groovy.lang.Closure) instead. |
|
T |
getAt(String name)
Locates an object by name, failing if there is no such task. |
|
T |
getByName(String name)
Locates an object by name, failing if there is no such object. |
|
T |
getByName(String name,
Closure configureClosure)
Locates an object by name, failing if there is no such object. |
|
TaskCollection<T> |
matching(Closure closure)
Returns a collection which contains the objects in this collection which meet the given closure specification. |
|
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(Closure closure)
Adds a closure to be called when a task is added to this collection. |
|
|
withType(Class<S> type)
Returns a collection containing the objects in this collection of the given type. |
Methods inherited from interface org.gradle.api.NamedDomainObjectSet |
---|
findAll |
Methods inherited from interface org.gradle.api.NamedDomainObjectCollection |
---|
add, addAll, addRule, addRule, findByName, getAsMap, getNamer, getRules |
Methods inherited from interface org.gradle.api.DomainObjectCollection |
---|
all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType |
Methods inherited from interface java.util.Collection |
---|
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from interface java.util.Set |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
TaskCollection<T> matching(Spec<? super T> spec)
matching
in interface DomainObjectCollection<T extends Task>
matching
in interface NamedDomainObjectCollection<T extends Task>
matching
in interface NamedDomainObjectSet<T extends Task>
spec
- The specification to use.
TaskCollection<T> matching(Closure closure)
matching
in interface DomainObjectCollection<T extends Task>
matching
in interface NamedDomainObjectCollection<T extends Task>
matching
in interface NamedDomainObjectSet<T extends Task>
closure
- The specification to use. The closure gets a collection element as an argument.
T getByName(String name, Closure configureClosure) throws UnknownTaskException
getByName
in interface NamedDomainObjectCollection<T extends Task>
name
- The object nameconfigureClosure
- The closure to use to configure the object.
UnknownTaskException
T getByName(String name) throws UnknownTaskException
getByName
in interface NamedDomainObjectCollection<T extends Task>
name
- The object name
UnknownTaskException
<S extends T> TaskCollection<S> withType(Class<S> type)
withType
in interface DomainObjectCollection<T extends Task>
withType
in interface NamedDomainObjectCollection<T extends Task>
withType
in interface NamedDomainObjectSet<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(Closure closure)
closure
- The closure to be called@Deprecated void allTasks(Action<? super T> action)
DomainObjectCollection.all(org.gradle.api.Action)
instead.
action
- The action to be executed@Deprecated void allTasks(Closure closure)
DomainObjectCollection.all(groovy.lang.Closure)
instead.
closure
- The closure to be calledT getAt(String name) throws UnknownTaskException
NamedDomainObjectCollection.getByName(String)
. You can call this method in your build script by using the groovy []
operator.
getAt
in interface NamedDomainObjectCollection<T extends Task>
name
- The object name
UnknownTaskException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |