public final class ProviderUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Transformer<List<T>,Iterable<T>> |
filter(Spec<? super T> spec)
Adapts a spec to a Gradle collection provider transform.
|
static <T> Provider<T> |
fixed(T value)
Creates a Gradle
Provider of the specified constant value without a ProviderFactory. |
static <S> Provider<S> |
forUseAtConfigurationTime(Provider<S> provider) |
static <T> Class<T> |
getType(Provider<T> self)
Returns the object type provided by the Gradle provider.
|
static <T> Provider<T> |
notDefined()
Returned an undefined provider.
|
static <T> Provider<T> |
supplied(Callable<T> callable)
Creates a Gradle
Provider provided by the specified callable without a ProviderFactory. |
public static <T> Provider<T> fixed(T value)
Provider of the specified constant value without a ProviderFactory.T - the type of the value.value - a constant value to provide.Provider instance of the specified value.public static <T> Provider<T> supplied(Callable<T> callable)
Provider provided by the specified callable without a ProviderFactory.T - the type of the value.callable - a value providerProvider instance of the specified callable provider.public static <T> Provider<T> notDefined()
Provider instance without any value.@Nullable public static <T> Class<T> getType(Provider<T> self)
T - the type of object providedself - the provider to query the provided type.public static <T> Transformer<List<T>,Iterable<T>> filter(Spec<? super T> spec)
T - element type to filterspec - a filter specTransformer instance to filter the element of Gradle collection provider, never null.