api / org.gradle.api / PolymorphicDomainObjectContainer / containerWithType

containerWithType

abstract fun <U : T> containerWithType(type: Class<U>): NamedDomainObjectContainer<U>

Creates a regular container that wraps the polymorphic container presenting all elements of a specified type.

Parameters

type - the type of the container elements

- the type of the container elements

Return
a NamedDomainObjectContainer providing access to elements of type U.