abstract fun create(name: String): T
Creates a new item with the given name, adding it to this container.
name
- The name to assign to the created object
InvalidUserDataException
- if an object with the given name already exists in this container.
Return
The created object. Never null.
abstract fun create(name: String, configureClosure: Closure<Any>): T
Creates a new item with the given name, adding it to this container, then configuring it with the given closure.
name
- The name to assign to the created object
configureClosure
- The closure to configure the created object with
InvalidUserDataException
- if an object with the given name already exists in this container.
Return
The created object. Never null.
abstract fun create(name: String, configureAction: Action<in T>): T
Creates a new item with the given name, adding it to this container, then configuring it with the given action.
name
- The name to assign to the created object
configureAction
- The action to configure the created object with
InvalidUserDataException
- if an object with the given name already exists in this container.
Return
The created object. Never null.