abstract fun <U : T> registerFactory(type: Class<U>, factory: NamedDomainObjectFactory<out U>): Unit
abstract fun <U : T> registerFactory(type: Class<U>, factory: Closure<out U>): Unit
Registers a factory for creating elements of the specified type. Typically, the specified type is an interface type.
type
- the type of objects created by the factory
factory
- the factory to register
- the type of objects created by the factory
IllegalArgumentException
- if the specified type is not a subtype of the container element type