# invoke

operator fun String. invoke(configuration: T.() -> Unit): NamedDomainObjectProvider<T>(source)

Configures an object by name, without triggering its creation or configuration, failing if there is no such object.

#### See also

NamedDomainObjectContainer.named
NamedDomainObjectProvider.configure

operator fun <U : T> String. invoke(type: KClass<U>, configuration: U.() -> Unit): NamedDomainObjectProvider<U>(source)

Configures an object by name, without triggering its creation or configuration, failing if there is no such object.

#### See also

PolymorphicDomainObjectContainer.named
NamedDomainObjectProvider.configure

operator fun <U : T> String. invoke(type: KClass<U>): NamedDomainObjectProvider<U>(source)

Locates an object by name and type, without triggering its creation or configuration, failing if there is no such object.

#### See also

PolymorphicDomainObjectContainer.named

operator fun String. invoke(): NamedDomainObjectProvider<T>(source)

### Deprecated

Use named(String) instead.

#### Replace with

    named(this)

Content copied to clipboard

Locates an object by name, without triggering its creation or configuration, failing if there is no such object.

#### See also

NamedDomainObjectContainer.named