# create

abstract fun create(name: String)(source)

Defines an item with the given name and type T. The item is not created immediately, but is instead created as it is required.

#### Since

2.5

#### Parameters

name

The name.

abstract fun create(name: String, configAction: Action<in T>)(source)

Defines an item with the given name and type T. The item is not created immediately, but is instead created as it is required.

The given action is invoked to configure the item when the item is required.

#### Since

2.5

#### Parameters

name

The name.

configAction

An action that initialises the item. The action is executed when the item is required.

abstract fun <S : T?> create(name: String, type: Class<S>)(source)

Defines an item with the given name and type. The item is not created immediately, but is instead created as it is required.

#### Since

2.5

#### Parameters

name

The name.

abstract fun <S : T?> create(name: String, type: Class<S>, configAction: Action<in S>)(source)

Defines an item with the given name and type. The item is not created immediately, but is instead created as it is required.

The given action is invoked to configure the item when the item is required.

#### Since

2.5

#### Parameters

name

The name.

configAction

An action that initialises the item. The action is executed when the item is required.