api / org.gradle.kotlin.dsl / org.gradle.api.NamedDomainObjectCollection / get

get

operator fun <T : Any> NamedDomainObjectCollection<T>.get(name: String): T

Locates an object by name, failing if there is no such object.

Parameters

name - The object name

Exceptions

UnknownDomainObjectException - when there is no such object in this collection.

Return
The object with the given name.

See Also

NamedDomainObjectCollection.getByName