gradle
8.5

# get

abstract fun <S> get(type: Class<S>, spec: Spec<out Any>): BinaryProvider<S>(source)

Returns a BinaryProvider that contains the single binary matching the specified type and specification. The binary will be in the finalized state. The provider can be used to apply configuration to the element before it is finalized.

Querying the return value will fail when there is not exactly one matching binary.

#### Return

a binary from the collection in a finalized state

#### Parameters

type

type to match

spec

specification to satisfy. The spec is applied to each binary prior to configuration.

<S>

type of the binary to return

abstract fun get(spec: Spec<out Any>): BinaryProvider<T>(source)

Returns a Provider that contains the single binary matching the given specification. The binary will be in the finalized state. The provider can be used to apply configuration to the element before it is finalized.

Querying the return value will fail when there is not exactly one matching binary.

#### Return

a binary from the collection in a finalized state

#### Parameters

spec

specification to satisfy. The spec is applied to each binary prior to configuration.

abstract fun get(): Set<T>(source)

Returns the set of binaries from this collection. Elements are in a finalized state.