# existing

fun <T : Any, C : NamedDomainObjectCollection<T>> C.existing(action: T.() -> Unit): ExistingDomainObjectDelegateProviderWithAction<out C, T>(source)

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

`tasks { val jar by existing { ... } }`

#### Parameters

T

the domain object type

C

the concrete container type

action

the configuration action

fun <T : Any, C : NamedDomainObjectCollection<T>, U : T> C.existing(type: KClass<U>): ExistingDomainObjectDelegateProviderWithType<out C, U>(source)

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

`tasks { val jar by existing(Jar::class) }`

#### Parameters

T

the domain object type

C

the concrete container type

type

the domain object type

fun <T : Any, C : NamedDomainObjectCollection<T>, U : T> C.existing(type: KClass<U>, action: U.() -> Unit): ExistingDomainObjectDelegateProviderWithTypeAndAction<out C, U>(source)

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

`tasks { val jar by existing(Jar::class) { ... } }`

#### Parameters

T

the domain object type

C

the concrete container type

type

the domain object type

action

the configuration action

val <T : Any, C : NamedDomainObjectCollection<T>> C.existing: ExistingDomainObjectDelegateProvider<out C>(source)

Idiomatic way of referring to the provider of a well-known element of a collection via a delegate property.

`tasks { val jar by existing }`

#### Parameters

T

the domain object type

C

the concrete container type