FunctionalSourceSet
API Documentation: FunctionalSourceSet
A view of the language source sets with a similar function (production code, test code, etc.).
Properties
Property | Description |
---|---|
The contents of this view as a Provider of <T> instances. |
Methods
Method | Description |
---|---|
|
Configures an element of the specified name. |
|
Configures an element of the specified name. |
|
Configures an element of the specified name and type. |
|
Configures an element of the specified name and type. |
|
Returns an element provider for the specified name and type. |
|
Returns an element provider for the specified name. |
|
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized. This method is equivalent to view.withType(Foo).configureEach { … }. |
|
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized. This method is equivalent to view.withType(Foo).configureEach { … }. |
|
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers an action to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers a closure to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Returns the contents of this view as a Set of <T> instances. |
|
Returns a list containing the results of applying the given mapper function to each element in the view. |
|
Returns a single list containing all elements yielded from results of mapper function being invoked on each element of this view. |
|
Returns a single list containing all elements matching the given specification. |
Method Details
void configure(String name, Action<? super T> action)
Configures an element of the specified name.
void configure(String name, Closure<Void> closure)
Configures an element of the specified name.
void configure(String name, Class<S> type, Closure<Void> closure)
Configures an element of the specified name and type.
void configure(String name, Class<S> type, Action<? super S> action)
Configures an element of the specified name and type.
DomainObjectProvider<S> get(String name, Class<S> type)
Returns an element provider for the specified name and type.
DomainObjectProvider<T> get(String name)
Returns an element provider for the specified name.
void configureEach(Class<S> type, Action<? super S> action)
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized.
This method is equivalent to view.withType(Foo).configureEach { … }
.
void configureEach(Class<S> type, Closure<Void> closure)
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized.
This method is equivalent to view.withType(Foo).configureEach { … }
.
void configureEach(Closure<Void> closure)
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Action<? super T> action)
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Spec<? super T> spec, Action<? super T> action)
Registers an action to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Spec<? super T> spec, Closure<Void> closure)
Registers a closure to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized.
Provider<List<S>> map(Transformer<? extends S, ? super T> mapper)
Returns a list containing the results of applying the given mapper function to each element in the view.
The returned Provider is live, and tracks changes of the view.
Provider<List<S>> flatMap(Transformer<? extends Iterable<S>, ? super T> mapper)
Returns a single list containing all elements yielded from results of mapper function being invoked on each element of this view.
The returned Provider is live, and tracks changes of the view.