maybe
  inline fun <U : T, T : Any> PolymorphicDomainObjectContainer<T>.maybeCreate(name: String, type: KClass<U>): U
inline fun <U : T, T : Any> PolymorphicDomainObjectContainer<T>.maybeCreate(name: String, type: KClass<U>): U
Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.PolymorphicDomainObjectContainer.maybeCreate.
See also
Polymorphic
Creates a domain object with the specified name and type if it does not exists, and adds it to the container.
Return
the created domain object
Parameters
name
the name of the domain object to be created
 the type of the domain object to be created
Throws
Invalid
if a domain object with the specified name already exists or the container does not support creating a domain object with the specified type
if a domain object with the specified name exists with a different type