# newInstance

inline fun <T : Any> ObjectFactory.newInstance(type: KClass<out T>, vararg parameters: Any): T
inline fun <T : Any> ObjectFactory.newInstance(type: KClass<out T>, vararg parameters: Any): T

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.model.ObjectFactory.newInstance.

#### Since

4.2

#### See also

ObjectFactory.newInstance

inline fun <T : Any> ObjectFactory.newInstance(vararg parameters: Any): T

Create a new instance of `T`, using parameters as the construction parameters.

#### Return

the created named object

#### Parameters

T

The type of object to create

parameters

The construction parameters

#### See also

ObjectFactory.newInstance