T - the (base) container element type@Incubating public interface ExtensiblePolymorphicDomainObjectContainer<T> extends PolymorphicDomainObjectContainer<T>, org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<T>
PolymorphicDomainObjectContainer that can be extended at runtime to
create elements of new types.| Modifier and Type | Method and Description |
|---|---|
<U extends T> |
registerBinding(Class<U> type,
Class<? extends U> implementationType)
Registers a binding from the specified "public" domain object type to the specified implementation type.
|
<U extends T> |
registerFactory(Class<U> type,
Closure<? extends U> factory)
Registers a factory for creating elements of the specified type.
|
<U extends T> |
registerFactory(Class<U> type,
NamedDomainObjectFactory<? extends U> factory)
Registers a factory for creating elements of the specified type.
|
containerWithType, create, create, maybeCreateconfigure, create, create, create, maybeCreatefindAll, matching, matching, withTypeadd, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getNames, getRulesall, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType<U extends T> void registerFactory(Class<U> type, NamedDomainObjectFactory<? extends U> factory)
registerFactory in interface org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<T>U - the type of objects created by the factorytype - the type of objects created by the factoryfactory - the factory to registerIllegalArgumentException - if the specified type is not a subtype of the container element type<U extends T> void registerFactory(Class<U> type, Closure<? extends U> factory)
U - the type of objects created by the factorytype - the type of objects created by the factoryfactory - the factory to registerIllegalArgumentException - if the specified type is not a subtype of the container element type<U extends T> void registerBinding(Class<U> type, Class<? extends U> implementationType)
Inject, its arguments will be injected.
In general, registering a binding is preferable over implementing and registering a factory.
U - a public domain object typetype - a public domain object typeimplementationType - the corresponding implementation type